Session Variable - Question

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2008
Posts: 30
Reputation: Potato.Head is an unknown quantity at this point 
Solved Threads: 0
Potato.Head's Avatar
Potato.Head Potato.Head is offline Offline
Light Poster

Session Variable - Question

 
0
  #1
Dec 29th, 2008
hi to all, I have a page that contains two frames (before you start telling me that frames are not good, I know but this is the requierement from my course, what I can do?), anyway I have a main page that contains leftframe.aspx and rigthframe.aspx, everything is working ok until I start using the the Session variable, it is possible to use this variable between frames?
I did the following:
leftframe.aspx(in the C# code):
  1. Session["test"] = "Test String";
leftframe.aspx(in the C# code)
  1. if (Session["test"] != null)
  2. mystring = (string)Session["test"];

Do I need to do some settings before using the Session varaible, when I output the varaible is always 'null', look like noone set this variable before.
Thanks in advanced
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 49
Reputation: iDeveloper is an unknown quantity at this point 
Solved Threads: 7
iDeveloper iDeveloper is offline Offline
Light Poster

Re: Session Variable - Question

 
0
  #2
Dec 29th, 2008
Check this out:

This may be a security limitation in IE.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 104
Reputation: Aneesh_Argent is an unknown quantity at this point 
Solved Threads: 18
Aneesh_Argent Aneesh_Argent is offline Offline
Junior Poster

Re: Session Variable - Question

 
0
  #3
Dec 30th, 2008
Make sure that the code that store session value on leftframe.aspx is executed first before the code on rightframe.aspx is trying to access that session value. Otherwise it should work. Can u tell me on which events these two code snippets belongs?
Last edited by Aneesh_Argent; Dec 30th, 2008 at 1:29 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC