By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,369 Members | 1,533 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,369 IT Pros & Developers. It's quick & easy.

How to restore password TextBox

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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

Nov 18 '05 #2

P: n/a
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

Nov 18 '05 #3

P: n/a
some thing like

txtPassword.attributes.add("value","thepassword")

"Amil Hanish" <am********@hotmail.com> wrote in message
news:uS*************@tk2msftngp13.phx.gbl...
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

Nov 18 '05 #4

P: n/a
some thing like

txtPassword.attributes.add("value","thepassword")

"Amil Hanish" <am********@hotmail.com> wrote in message
news:uS*************@tk2msftngp13.phx.gbl...
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

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.