J
Jakob Bengtsson
Hi,
I'm building an ASP .NET application. I have a routine to
check some info in an object stored in a Session variable.
As it is, I have to duplicate this code in every page.
Is there any way to build a class which can access the
info stored in a session variable?
I would like to build a class containing methods, which I
can call from my web pages. This class will read, for
instance, Session("info"), and perform some routines
based on the data.
I can build the class, and make it
inherit "System.Web.UI.Page", in order to get this
functionality, but is there no better way? There really
seems to be no need to inherit all the functionality of a
page (it clutters Intellisense, if nothing else)!?
Any help is appreciated.
Regards,
Jakob
I'm building an ASP .NET application. I have a routine to
check some info in an object stored in a Session variable.
As it is, I have to duplicate this code in every page.
Is there any way to build a class which can access the
info stored in a session variable?
I would like to build a class containing methods, which I
can call from my web pages. This class will read, for
instance, Session("info"), and perform some routines
based on the data.
I can build the class, and make it
inherit "System.Web.UI.Page", in order to get this
functionality, but is there no better way? There really
seems to be no need to inherit all the functionality of a
page (it clutters Intellisense, if nothing else)!?
Any help is appreciated.
Regards,
Jakob