1

Hi I can't seem to find a solution that works for me. I have two panels: Websiteform and Licenceform. The user enter his/her credentials in a textbox, their credentials get verified. Now after the credentials have been verified and the user clicks the back button to go from websiteform to licenceform, I need the credentials to still be there when we return to websiteform.

This should only work for the current session as starting a new session will have all controls revert to default values.

p0enkie
  • 665
  • 2
  • 11
  • 22
  • ASP or Winforms? Think Winforms but you mention Session as well so just making sure. – BlueChippy Feb 01 '12 at 10:21
  • I can see where it was unclear. It is a Winforms application. Session was probably not the right the word, I intended it to mean that once you close the application the controls revert to default values. – p0enkie Feb 01 '12 at 12:39
  • See http://stackoverflow.com/q/4438654/449156, it may offer some help. Other ways are persisting to a db or file of somekind. – BlueChippy Feb 02 '12 at 05:35
  • Thanx @BlueChippy! I looked into it and I may have found a solution. Will keep you posted. – p0enkie Feb 02 '12 at 13:06
  • I have used the Application.UserAppDataRegistry.setValue and getValue methods. For my purposes this was sufficient. – p0enkie Feb 06 '12 at 07:19

1 Answers1

1

There are Many ways to remember the values.but which to use it depends on you.cause you want remain value according the session so .

You can Use Session variable.put the corresponding values like...

 System.Web.HttpContext.Current.Session[SessionstringName] = SessionValue;

And acess those value..

   (TypeCast)System.Web.HttpContext.Current.Session[SessionstringName]
joshua
  • 2,371
  • 2
  • 29
  • 58