ASP.NET - Global location to execute some code? -


i have newbie .net question.

where place write code executes globally before each page load? operations doing are:

a) open database connection b) check session see if user logged in c) maybe initialize few objects

i thinking of doing in master file, wasn't sure if that's idea. , maybe each of operations listed, maybe there's feature in .net already, don't have "re-invent" wheel.

i create base page pages inheriet (except master pages these have different base class)

you override preload on base page , checks in there.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -