Global Shared functions, shared variables

I

Imran Aziz

Hello All,
How can I create a Global shared function that automatically gets shared
in all ASP.net files. The issue is that when a user comes to the site I am
creating, I check if the user is valid and based on that add session data,
but the problem is that this is in a user control , that gets fired after
the main page contents have been called, hence the session variables are not
found, for the first time. How can I set these session variables in a global
function so that it gets included in all ask files. I am using windows
authentication, so any help related to that will be great. Thanks a lot.
Imran.
 
S

Stefan

I'm not sure what you mean, but in the global.asax codebehind, you will
see several events where you can place your code (e.g. Session_Start,
....)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top