I had a requirement, that when user details are edited the admin should be able to edit the password.
First I should to display clear password (ofcourse it is worng) as that page was visible to admin only.
Then I had to change that and had to display asterik (‘*’) instead of clear password.
So Obvisiouly I did something like
18 this.txtPassword.Text = (string)dr;
But this did not work for me
So I googled and found this article
so I just changed the above code to
and it worked liked a charm.
Note: Please do read this article, if you want to preserve the value for password field even when postback occurs.
That’s all folks.
Hope you enjoyed this post.
Comments Good as well as Bad are most welcome.
NJoy !!! 🙂