1

When I set the textmode = Password the value of the textbox is lost after the postback since as I know the textbox class implement the interface IpostbcakdataHandler so that it retains the value either we disable the textbox viewstate false.

So I want to know the reason why it is happening.

Marc Audet
  • 46,011
  • 11
  • 63
  • 83
naval
  • 1,423
  • 1
  • 13
  • 26
  • 4
    This has been asked before, http://stackoverflow.com/questions/2169568/asptextbox-value-disappears-in-postback-only-when-password – Karl-Johan Sjögren Aug 26 '13 at 11:22
  • When the value of the txtPassword has been last after postback i want to know the case,Is their any thing happen in page life cycle that made the blank the text box value. – naval Aug 26 '13 at 11:22
  • 3
    Password being 'lost' after postback is by design and is a security measure. This is fairly common and is seen on many sites online. – Full Time Skeleton Aug 26 '13 at 11:23
  • pls see this http://stackoverflow.com/questions/2169568/asptextbox-value-disappears-in-postback-only-when-password – Dhaval Aug 26 '13 at 11:24
  • It is good to enter password on postback, as the user can confirm each time he enters it. – csLijo Aug 26 '13 at 11:26
  • Yes i know the but at which event of page or anything written the class of the text box that made the text box value blank when i set the text mode =password i want to know where it is written – naval Aug 26 '13 at 11:26
  • Sounds like maybe you want to know how vs. why? Have you tried checking out the MVC source code at http://aspnetwebstack.codeplex.com/? Not exactly the same platform but seeing the implementation might answer your questions. – Mayo Aug 26 '13 at 11:51

0 Answers0