Saving values in a text box?

  • Thread starter Thread starter Anon
  • Start date Start date
A

Anon

Hello All!
I was wondering how I can go about saving the last string entered into a
textbox. I would like to save username or pwd info in textboxes in my forms
so that users don't have to continually type them!

Thanks!

Luis
 
Use server textboxes (System.Web.UI.WebControls.Textbox). They
automatically do what you want.
 
Winform? Lots of ways to do this. I am creating a class that holds the
username and serializing it to disk in the user profile folder.

email me if you want the code

Greg
 
Anon said:
Hello All!
I was wondering how I can go about saving the last string entered into a
textbox. I would like to save username or pwd info in textboxes in my forms
so that users don't have to continually type them!

Thanks!

Luis

If it's a Windows Forms (desktop) application, you can save it to the
registry.

For any type of app, you can save the information to a database table. If
the permissions of the executing machine allow it, you can also save to the
filesystem as XML or text. For a browser-based app, you could use a cookie
stored on the user's machine.

It is an extremely bad security practice to automatically populate a
password field (you might as well just stick a post-it note with the info on
the monitor). *NEVER* do this. However, in the case of a browser-based app
using a cookie, automatic login (without displaying the login form) is a
common practice. If you do this, be certain you encrypt the password so it
can't be simply read by someone who gains access to the computer. I advise
against doing this where the data being accessed is sensitive.

You really should explain to the users of your app that the few extra
keystrokes they have to enter to login is far better for security. If they
complain, tell them then they shouldn't bother with security at all and just
leave it wide open for anyone, since that's essentially what they're
wanting.

Alan
 
I sure would be interested in the class that serializes to a user profile folder. My e-mail is (e-mail address removed). Thanks.
 
I hope that is an email alias, otherwise you can expect lots of additional
spam from the spambots that scour newsgroups looking for email addresses.


Dennis said:
I sure would be interested in the class that serializes to a user profile
folder. My e-mail is (e-mail address removed). Thanks.
 
I am quick with the delete key! Also protected by every means know to man so don't mind spam e-mail as i never read it, just delete it.
 
Dennis, here is a link to that class I posted earlier

http://tinyurl.com/5vg48

If you need me to explain how it works, just let me know. May not be the
best method, but it is working for me. :^)

Greg


Dennis said:
I am quick with the delete key! Also protected by every means know to man
so don't mind spam e-mail as i never read it, just delete it.
 
Back
Top