I want to store a cookie using something like
Response.Cookies.Set(new HttpCookie("name","value");
after I have finished the page lifecycle, so it makes sense to put it in the OnUnload()
event.
However at this stage, Request
and Response
have already been unloaded, so throw a null ref exception.
Has anybody got any brain storms to get around this?
All i can think of is putting it in OnPreRender()
, but am worried this may be too 'soon'.