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