Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to share session variable between asp and asp.net 2

Status
Not open for further replies.

dembyg

Programmer
Oct 20, 2001
58
US
I have an asp form that has sessions for first and last name
code reads.

asp
Session("sesFirstName") = Dembyg
Session("sesLastName") = Dembyg


I would like to use within my asp.net page. how is this done.


Thanks for helping
 
I believe that my problem is in using the master.page.... I use a response.write to debug whether the session is filled... Thoughout the application the response.write has the select session information.. however if i put the sesssin var in a field within the header then it seems to refresh itself to a null value..
 
OK, the session information in he web.config file is fine. As for the Master Pages, that isn't the problem. There is no difference between setting session variables in a Master Page or a standarad Page. I suggest you put a breakpoint on the session end event and work through your application to see if you can spot why it is being hit.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Ok.... I will try that. Thanks for your help
 
You should check to see if the session is empty. Your Menu page passes the ID which is requested to setup your sessions variable. Your addnew.aspx page propably does not pass ID so that would set your session to null.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top