Where do I put a generic function used in all pages??

  • Thread starter Thread starter John Timney \(Microsoft MVP\)
  • Start date Start date
J

John Timney \(Microsoft MVP\)

Well, you could always give your global.asax a classname. The you can add
methods etc to it as you would any other class and they would be available
to the code base.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
create a generic page with this function, then inherit from it for all your
other pages, that's what we do with great sucess.
 
Hi all,

I'm still learning asp.net so this may seem a simple question, but
here goes anyway. I have a generic function that I wish to access
from all pages in my web application. Intead of putting this
function into the code-behind of every page, is there somewhere I can
put it so that it can access it from all pages? I tried doing it the
same way that I create a class with a namespace etc.. but that didin't
work. I tried placing it in the global.asax but that didn't work
either.

Any help would be appreciated

Thanks

Rene
 
Back
Top