Tuesday, December 9, 2008

Assign Value to TextBox - Password TextMode ASP.NET

You have a Textbox with the password TextMode and you try to assign a value to password textmode.
If you've got a password textbox name txtPassword, you cannot assign the Text property to it in code, or via DataBinding.

below is the method to assign value to the Password Textbox

txtPassword.Attributes.Add("value", "PASSWORD VALUE")

this is one of the way to assign value to password textbox