Link to home
Create AccountLog in
Avatar of ej1111
ej1111

asked on

c# and GUIDs sqldbtype.uniqueidentifier

im using a guid which im returning from a stored procedure as a parameter and am trying to set the guid as a session variable. So:  

  SqlParameter parmtid = new SqlParameter();
                    parmtid.ParameterName = "@theaterID";
                    parmtidSqlDbType = SqlDbType.UniqueIdentifier;
                    parmtid.Direction = ParameterDirection.Output;
                    cmd.Parameters.Add(parmtid);
how do i set that parameter value as a session?

thanks for help!
Avatar of Rob Siklos
Rob Siklos
Flag of Canada image

What happens if you try something like

Session['param'] = parmtid;
Avatar of ej1111
ej1111

ASKER

I get a lot of cannot convert type string to system.guid type messages. quick change of thoughts, im actually trying set that as a guid value; so we have a class with:


static public guid tid and i want to set tid
ASKER CERTIFIED SOLUTION
Avatar of Anurag Agarwal
Anurag Agarwal
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer