Session Cookie

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?
 
M

Markus Palme

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";
 
G

Guest

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";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,252
Latest member
MeredithPl

Latest Threads

Top