all groups > c# > march 2008 >
You're in the

c#

group:

Can't initialize password textbox


Can't initialize password textbox Parrot
3/2/2008 7:55:01 PM
c#: I am using information from a cookie to initialize a password box but the
password is blank when displaying the web page. Can anyone explain why I
can't programmatically initialize a password textbox. I am able to intialize
the user id textbox but not the password box. I inspect the Password.Text
value in debug mode and it has the correct value but yet the password box is
blank when the page is displayed.
Re: Can't initialize password textbox Parrot
3/3/2008 7:17:02 AM
Then how do programmers handle initializing passwords for those who want
their password remembered? I know that when I want my password remembered
the password is intialized with asteriks in the box. It seems to me the
only way to do it is to put the password in a hidden field and then access
that field if nothing is entered in the password box by the user.
Dave

[quoted text, click to view]
Re: Can't initialize password textbox Jon Skeet [C# MVP]
3/3/2008 7:27:13 AM
[quoted text, click to view]

That should usually be handled on the client, by the browser itself.
Most browsers are able to store passwords in a safe way - unlike
having it in the page.

Personally I try to avoid the server needing to have the plaintext
password available in the first place, aside from during password
changes. Usually, only a hash should be available.

Re: Can't initialize password textbox Ignacio Machin ( .NET/ C# MVP )
3/3/2008 7:47:56 AM
Hi,

[quoted text, click to view]

Have you read the docs? maybe that is the expected way.
IMO it should be like that, otherwise a savvy user could do a right click,
see code and see your password just there.
AddThis Social Bookmark Button