P
Phoenix
Hi,
I figured this one out before and have forgotten the answer. I have an
..aspx page that has user settable options. When you click an option in
the listbox for example, it should save that option as a cookie as long
as your browser is open..The minute you leave the page and come back
(same site), it forgets. I am writing the cookie in the
page_load...Here's my code....Also, i'm not using codebehind and am not
compiling. (This is a one-off .NET page integrated within a legacy ASP
site.) Am I missing something in my GLobal.asax? my web.config? Help
please?! I have it working in a compiled version of a different ASP.NET
site and can't see where I've gone wrong.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If isPostBack Then
pil_category = lbPILCategory.SelectedItem.Value
Response.Cookies("session")("pilcategory")= pil_category
Response.write("cookie="&pil_category) 'this writes the correct
answer
else
pil_category = Request.Cookies("session")("pilcategory")
Response.write("pilcategory="&pil_category)
if pil_category <> NOTHING then
lbPILCategory.SelectedValue = pil_category
end if
end if
end sub
I figured this one out before and have forgotten the answer. I have an
..aspx page that has user settable options. When you click an option in
the listbox for example, it should save that option as a cookie as long
as your browser is open..The minute you leave the page and come back
(same site), it forgets. I am writing the cookie in the
page_load...Here's my code....Also, i'm not using codebehind and am not
compiling. (This is a one-off .NET page integrated within a legacy ASP
site.) Am I missing something in my GLobal.asax? my web.config? Help
please?! I have it working in a compiled version of a different ASP.NET
site and can't see where I've gone wrong.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If isPostBack Then
pil_category = lbPILCategory.SelectedItem.Value
Response.Cookies("session")("pilcategory")= pil_category
Response.write("cookie="&pil_category) 'this writes the correct
answer
else
pil_category = Request.Cookies("session")("pilcategory")
Response.write("pilcategory="&pil_category)
if pil_category <> NOTHING then
lbPILCategory.SelectedValue = pil_category
end if
end if
end sub