Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Password value

Status
Not open for further replies.

ami7

Programmer
Oct 3, 2002
48
GB
Hi,

In my form(.aspx page) i have 2 text fields for password and re-confirm password.
When i click a button it clears the password value .
Is there anyway to get the value back to the password field.

Thanks,
ami.
 
well, you could:

- make sure viewstate is enabled on the textbox (although, since I havn't used one with passwords yet, I'm not sure if clearing the textbox is the default behaviour)

- store the value in a session variable and fill it in when the pages posts back

- store the value in viewstate and fill it in when the page posts back.

Some options anyway

D'Arcy
 
I don't think that works D. I have played around with passwords some and even if you set the text value to something in your code behind it dissapears by the time it reaches the browser. I checked and my viewstate was turned on, but whenever the page is refreshed, does a postback any value typed in the box is gone.

You may be able to do this with some client side javascript I am not sure. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
That would make sense actually: if it were stored over a postback, that would be a security issue.

Could be just the default behavior, but its a behavior that makes sense.

D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top