W
Wade
Hi all,
We have created some "Base" class pages for our WebForms and UserControls.
For instance, when we create a WebForm called "WebForm1.aspx", instead of
inheriting from "System.Web.UI.Page" we implement from our "Base" class page
which itself inherits from "System.Web.UI.Page" -- I know, pretty standard.
We do the same with our UserControls, instead they inherit from
"System.Web.UI.UserControl".
Now, there are some methods that we want to include in these "Base" class
pages -- we don't want them in a seperate class because we don't want to
have to make them Shared (Static), nor do we want to instantiate them each
time. However, currently we have to declare these in both our WebForm base
class and our UserControl base class.
Does anyone have any a good way to centralize these methods so that we don't
have to duplicate them, yet they are accessible in each base class page?
Additionally, we have a number of Property's declared in these pages which
get and set data in the session object. These are also currently
duplicated, and we'd like to store them somewhere central so that they are
accessible by both sets of base classes.
Hope this makes sense.
Thanks!
Wade
We have created some "Base" class pages for our WebForms and UserControls.
For instance, when we create a WebForm called "WebForm1.aspx", instead of
inheriting from "System.Web.UI.Page" we implement from our "Base" class page
which itself inherits from "System.Web.UI.Page" -- I know, pretty standard.
We do the same with our UserControls, instead they inherit from
"System.Web.UI.UserControl".
Now, there are some methods that we want to include in these "Base" class
pages -- we don't want them in a seperate class because we don't want to
have to make them Shared (Static), nor do we want to instantiate them each
time. However, currently we have to declare these in both our WebForm base
class and our UserControl base class.
Does anyone have any a good way to centralize these methods so that we don't
have to duplicate them, yet they are accessible in each base class page?
Additionally, we have a number of Property's declared in these pages which
get and set data in the session object. These are also currently
duplicated, and we'd like to store them somewhere central so that they are
accessible by both sets of base classes.
Hope this makes sense.
Thanks!
Wade