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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sessions not working in webpage with frameset

Status
Not open for further replies.

saadahmed43

Programmer
May 24, 2007
5
0
0
US

I have an ASP .NET webpage with a frameset (regular HTML frameset)

The frameset has 2 frames.

In the top frame, I'm loading a webpage with an <ASP:Label>
control. In the Page_Load event of the page, I'm assigning the label a value from a Session variable as follows.


lblPreferredYear.Text = Session("PreferredYear").ToString()

The value is not getting assigned and the label is coming up blank.


I tried printing Session("PreferredYear") in other webpages that get loaded into the frameset and the session variable does have a value that gets printed.

I have tried putting the assign statement in the Page_Init event.

The first time I put it in and loaded the page, the label got a value.

But then it shows up blank again when i access the page again.


I have also tried replacing the label with a textbox but the same problems persists.

I'm using Visual Studio .NET 2003 and VB .NET. ASP .NET version 1.1.


Any help with this problem will be greatly appreciated.


Saad

 
I'm quite sure that each frame has its own Session. So, if you set a session variable in one frame, it will not be accessible in the other.

Senior Software Developer
 


SiriusBlackOp,
Thanks for your reply.

So, right now. I have textboxes instead of labels and I'm getting the textboxes to print the values of the Session variables. I cannot get it to print to labels for some reason. I'm leaving it as it is at this point. I fear that changing something on the page might cause it not work for textboxes even.

Again, thanks for your reply.


Saad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top