Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 30, 2012 10:11 AM by Pince
Apr 28, 2012 08:00 PM|LINK
I am developing a web application. At the login page a user(taxpayer) keys in his username which is actually a tax identification number. I have a database of all registered taxpayers. Once the user logs in, I want his tax identification number to be displayed
on subsequent pages that he will visit(usually in asp textboxes where he is to provide such identification number again). I also want his name and other relevant information to be automatically loaded into any required text fields on each page where necessary.
Apr 28, 2012 08:24 PM|LINK
you simply put that piece of information in the database and retrieve it when needed on subsequent pages. Or, if you want to keep it in memory for easy access you can also make use of
Session state. However note that you best not put too much information in Session state though so use it with care.
Apr 30, 2012 06:26 AM|LINK
Hi, you can try ASP.NET Profile:
Apr 30, 2012 06:51 AM|LINK
In your case I prefer to use Session. on session end event all information of user will be destroied automatically.
Apr 30, 2012 10:11 AM|LINK
You can use Session to pass a value from one to another page, in your case create session and store all required values while the login like
Session["taxPayer"] = "Tax Payer Name";
And you can get the tax payer name from your needed page, like
string taxPayerName= Session["taxPayer"];
Finally close your seesion,
Session["taxPayer"] = null;
Session.Abandon(); //Close all sessions