Hi guys i am new for ASP.net application, so guide me to learn more in this programming language. Well i have my own login form. Now the problem is, i want to create a session for all pages. Which means if user does some changes in some of the field/pages then, It updates in database on that particular user file. For example If user updates his account which contains
2. Email Address
so if he changes password or email address then it should update in database of that user.
Now in other pages i have
1. Departments invoice
2. Updating previous invoice
3. Send Invoice
Whatever ever changes made in this pages it should be change under that user. Hope you have understand everything.
Would appreciate that you help.
Please do help for this post as well for my previous post which is related to inserting background image in div. Image size 960px X 88px
"some data" would be whatever you wanted to store in the session variable. It could the user ID, their email, name, anything.
You place the code where ever you have your log in authentication code. If you have a log in button where you check the user name and password are correct that would be ideal. After you have verified the user you can set the session variable to indicate they have logged in successfully.
But is that valid for all pages?
Means my login.aspx.cs verify the login username and password. and after that as advice by you i have written session code. But is that valid for all the pages which needs this session.
Yes, any variables you store in session state are available to all pages called during that session. Say you had a log in section that showed the log in boxes initially but user data if they had logged in. Each page that had that section could check the session to see what the logged in status was and dispay the appropriate stuff.