Session Cookie

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to set a Session cookie to contain the error message from a catch
block so I can access the message after postback however in the page_load
event the cookie is null. Is it not possible to set this from a catch block?
 
Ron said:
I am trying to set a Session cookie to contain the error message from a catch
block so I can access the message after postback however in the page_load
event the cookie is null. Is it not possible to set this from a catch block?

Why do you use a cookie? The Session object is more comfortable.

Session["lasterrormessage"] = "xyz";
 
I mis-spoke.
I am trying to use the Session object.

Markus Palme said:
Ron said:
I am trying to set a Session cookie to contain the error message from a catch
block so I can access the message after postback however in the page_load
event the cookie is null. Is it not possible to set this from a catch block?

Why do you use a cookie? The Session object is more comfortable.

Session["lasterrormessage"] = "xyz";
 
Back
Top