Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 How to save SessionID to a variable

Author  Topic 

krista80
Starting Member

29 Posts

Posted - 2011-02-04 : 15:11:19
How do I save the SessionID to a variable that I can use in a sql query using ASP.NET and C#?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-02-04 : 15:21:52
http://msdn.microsoft.com/en-us/library/ms178581.aspx
Go to Top of Page

nirene
Yak Posting Veteran

98 Posts

Posted - 2011-02-05 : 05:02:10
Hai,

Dim X as string

X=Session("SessionName")

Nirene
Go to Top of Page

krista80
Starting Member

29 Posts

Posted - 2011-02-07 : 10:02:25
Hi, Nirene.

If that code was in C#, would there be any difference in how it was written? I am using C# for my program.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-02-07 : 16:59:56
The link I posted shows how in C# as well as several other languages.
Go to Top of Page

krista80
Starting Member

29 Posts

Posted - 2011-02-10 : 12:57:08
Thanks. Figured it out.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2011-02-23 : 10:41:26
question is why are u using a session ? they dont scale properly
Go to Top of Page
   

- Advertisement -