简体   繁体   中英

ASP.NET start-up page to record user details in database

I need to insert a record (username, department) in the backend SQL database table everytime a user enter a ASP.NET website (only if user is unique in the table).

I'm a newbie to ASP.NET - where is the page/function that is only run ONCE per user session in which I could enter codes to capture this detail? The user could enter the site from a number of pages.

Your help would be much appreciated!

its not on a page. it is in global.asax as

void Session_OnStart() {
   // your code goes here.
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM