All my aspx pages have public properties that control the display of menus. These properties are part of my BasePage class that overrides the Page class. When an unhandled exception is thrown I'm executing (Server.Execute) my error page. What I'm trying to do is maintain the properties of the page that threw the exception so that when the error page is executed the menus remain the same.
Even though the HttpContext is the same (by using Server.Execute) these properties are lost due to the initialzation of the error page. How can I maintain them? I tried passing them on the querystring but that doesn't appear to be an option using Server.Execute. Same with Server.Transfer. I don't want to redirect because the exception information will be lost (holding the exception in session or passing in querystring is not an option I can use).
Any ideas?
Even though the HttpContext is the same (by using Server.Execute) these properties are lost due to the initialzation of the error page. How can I maintain them? I tried passing them on the querystring but that doesn't appear to be an option using Server.Execute. Same with Server.Transfer. I don't want to redirect because the exception information will be lost (holding the exception in session or passing in querystring is not an option I can use).
Any ideas?