How to restore password TextBox

  • Thread starter Thread starter Amil Hanish
  • Start date Start date
A

Amil Hanish

I have a form with 5 TextBox controls. One of them is a password TextBox.
When the form is submitted, one of the other fields might have an invalid
format; on the repost showing the error in the other field, I want to
restore the password value into the password TextBox...without the user
re-entering it.

Seems like, by default, a password TextBox is blank on a repost. How can I
automatically reset the TextBox so that it has ***** in it, but the value is
the original password entered by the user?

Amil
 
It's this way by default for security reasons. If you populate the password textbox prior to sending it to the client broswer it will leave the password exposed in the source of the html document

There's a way to get around it using Javascript but as I mentioned above it will leave the password exposed

Also it's normal for web forms that have secured fields to have the user refill the secure information if the original submit fails

HTH
Suresh

----- Amil Hanish wrote: ----

I have a form with 5 TextBox controls. One of them is a password TextBox
When the form is submitted, one of the other fields might have an invali
format; on the repost showing the error in the other field, I want t
restore the password value into the password TextBox...without the use
re-entering it

Seems like, by default, a password TextBox is blank on a repost. How can
automatically reset the TextBox so that it has ***** in it, but the value i
the original password entered by the user

Ami
 
Back
Top