D
DotNetNewbie
Hi,
I have many querystring values that I pass around in my web
application, so I created a Custom Page class that simply inherits
from System.Web.UI.Page.
I then check for all the querystrings in the URL and initialize them,
and these are all public properties so I can reference them from
within ALL my .aspx pages since they inherit from my custom page
class.
The Problem? I also have UserControls in my page class, and I need to
access these same querystring values etc. from within those!
I *could* simply create a custom user control class and then do the
same thing, but it seems like redundant work.
What other solutions are there?
Maybe create a class that I store in Context.Items and setup all the
querystring values there during BeginRequest in a HttpModule, and then
just reference this from within my Page and UserControl class?
I have many querystring values that I pass around in my web
application, so I created a Custom Page class that simply inherits
from System.Web.UI.Page.
I then check for all the querystrings in the URL and initialize them,
and these are all public properties so I can reference them from
within ALL my .aspx pages since they inherit from my custom page
class.
The Problem? I also have UserControls in my page class, and I need to
access these same querystring values etc. from within those!
I *could* simply create a custom user control class and then do the
same thing, but it seems like redundant work.
What other solutions are there?
Maybe create a class that I store in Context.Items and setup all the
querystring values there during BeginRequest in a HttpModule, and then
just reference this from within my Page and UserControl class?