Tuesday, March 13, 2012

Textbox and PostBack

I have two textboxes on a web form (actually many other controls also, but that is not important), one has the Textmode set to "Password". When a PostBack event occurs, the page repaints normally, except that the textbox with the password is now blank, the other textbox retains it's info. How do I prevent this textbox from loosing it's text?

thanks in advance

tomJudging by my tests, you can't.

It is the nature of a password textbox to never show its content on page load. (For good reason, too.)
Hum, this a absolutely normal. It's not right if you're password is displayed in the textbox after a postback. Only one personn can display, type a password : the owner. So the control has been implemented with this logic.

0 comments:

Post a Comment