ASP.NET - loosing session vraibale when a pop up is opened

Asked By Anjali agarwal on 20-Mar-13 06:09 PM

Hi All,

I am looing the data stored in sesion vraibale when I trying to open the pop up window through hyperlink. Below is my code

<asp:HyperLink ID="HyperLink1" runat="server" Target="_blank" NavigateUrl='<%#"~/Viewer/DetailsViewer.aspx?ID=" + Eval("Id") + "&QueryID=" + Request.QueryString["QueryID"]%>' 
                          Text="View" />

The session variable that I am using in code behind becomes null as soon as I open the pop up using the <asp:hyperlink..

I am using asp.net 2010 and IE8

any help will be highly appreciated.

-anjali

Robbe Morris replied to Anjali agarwal on 20-Mar-13 07:34 PM
Are you running your site on a single IIS web server or load balanced across two or more?

Check the HttpContext.Current.Session.SessionID and make sure it is the same when your initial page loads and your pop up.  If they are not the same, a new session is being created.
Anjali agarwal replied to Robbe Morris on 21-Mar-13 03:58 AM
It is a single IIS web server