G
Guest
Hi,
This is a code reusability question. I want to include a function that sends an email message from my site. I want to include the code for the function only once and then be able to call this function from any of my pages.
I am aware that there are a number of different solutions to this problem -- user controls and "separate" assemblies are some of them.
What I really want is to extend the Application class (HTTPApplication or HTTPContext -- I am confused as to what does what) to achieve this functionality. In my uneducated terms, I want to open a class definition somewhere in my web project, add a couple of functions, and then be able to access these functions from other pages.
Global.asax and HTTPModules seem to provide this type of functionality for events but how can I do functions at the web application level?
Thanks for your advice.
Zheny
http://www.rusmex.com
This is a code reusability question. I want to include a function that sends an email message from my site. I want to include the code for the function only once and then be able to call this function from any of my pages.
I am aware that there are a number of different solutions to this problem -- user controls and "separate" assemblies are some of them.
What I really want is to extend the Application class (HTTPApplication or HTTPContext -- I am confused as to what does what) to achieve this functionality. In my uneducated terms, I want to open a class definition somewhere in my web project, add a couple of functions, and then be able to access these functions from other pages.
Global.asax and HTTPModules seem to provide this type of functionality for events but how can I do functions at the web application level?
Thanks for your advice.
Zheny
http://www.rusmex.com