Can't initialize password textbox

  • Thread starter Thread starter Parrot
  • Start date Start date
P

Parrot

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.
Dave
 
Hi,

Parrot said:
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.
Dave

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.
 
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
 
Then how do programmers handle initializing passwords for those who want
their password remembered?

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.

Jon
 
Back
Top