A
Al Wilkerson
Hey guys,
I'm having problems with creating/storing a value in a session variable for
later retrieving on another page.
Here is the aspx page where I create/store the value
<%Session["type"]="programming";%>
<asp:HyperLink id="hlnkProgramming"Target="main"
NavigateUrl="CategoryResults.aspx">Programming</asp:Hyperlink>
In the CategoryResults.aspx page I just have a Datagrid, and in the
CategoryResults.aspx.cs file I want to retrieve the value as below, however
no session value is ever stored.
string lSql;
if(Session["type"].Equals("programming"))
{
lSql = "Select * from Products where type = 'Programming'";
}
I thought you can create/store a value in a session variable on any aspx
page, and then retrieve that in any page of your whole application.
Any ideas ?
Thanks,
Al
I'm having problems with creating/storing a value in a session variable for
later retrieving on another page.
Here is the aspx page where I create/store the value
<%Session["type"]="programming";%>
<asp:HyperLink id="hlnkProgramming"Target="main"
NavigateUrl="CategoryResults.aspx">Programming</asp:Hyperlink>
In the CategoryResults.aspx page I just have a Datagrid, and in the
CategoryResults.aspx.cs file I want to retrieve the value as below, however
no session value is ever stored.
string lSql;
if(Session["type"].Equals("programming"))
{
lSql = "Select * from Products where type = 'Programming'";
}
I thought you can create/store a value in a session variable on any aspx
page, and then retrieve that in any page of your whole application.
Any ideas ?
Thanks,
Al