Passing values between asp.net pageshttp://forums.asp.net/t/1798089.aspx/1?Passing+values+between+asp+net+pagesMon, 30 Apr 2012 10:11:14 -040017980894956433http://forums.asp.net/p/1798089/4956433.aspx/1?Passing+values+between+asp+net+pagesPassing values between asp.net pages <p>Hi</p> <p>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.</p> 2012-04-28T20:00:49-04:004956441http://forums.asp.net/p/1798089/4956441.aspx/1?Re+Passing+values+between+asp+net+pagesRe: Passing values between asp.net pages <p>Hi,</p> <p>you simply put that piece of information in the <strong>database</strong> 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 <strong>Session state</strong>. However note that you best not put too much information in Session state though so use it with care.</p> <p>Grz, Kris.</p> 2012-04-28T20:24:06-04:004957538http://forums.asp.net/p/1798089/4957538.aspx/1?Re+Passing+values+between+asp+net+pagesRe: Passing values between asp.net pages <p>Hi, you can try ASP.NET Profile:</p> <p><a href="http://msdn.microsoft.com/en-us/library/2y3fs9xs.aspx">http://msdn.microsoft.com/en-us/library/2y3fs9xs.aspx</a></p> 2012-04-30T06:26:55-04:004957581http://forums.asp.net/p/1798089/4957581.aspx/1?Re+Passing+values+between+asp+net+pagesRe: Passing values between asp.net pages <p>In your case I prefer to use Session. on session end event all information of user will be destroied automatically.</p> 2012-04-30T06:51:57-04:004957936http://forums.asp.net/p/1798089/4957936.aspx/1?Re+Passing+values+between+asp+net+pagesRe: Passing values between asp.net pages <p>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</p> <p>Session[&quot;taxPayer&quot;] = &quot;Tax Payer Name&quot;;</p> <p>And you can get the tax payer name from your needed page, like</p> <p>string taxPayerName= Session[&quot;taxPayer&quot;];</p> <p>Finally close your seesion,</p> <p>Session[&quot;taxPayer&quot;] &nbsp;= null;&nbsp;</p> <p>(OR)&nbsp;</p> <p>Session.Abandon(); //Close all sessions</p> 2012-04-30T10:11:14-04:00