.Net ramblings
# Tuesday, 16 March 2004
Problem setting text for a password asp.net textbox

This short article outlines a quirk of the textbox control in Asp.Net, when set to password mode.  If you try and use myTextBox.Text = ….; it doesn't happen.

You might want to use something like this if you are presenting users with the facility to change a password, and you want to give them the option of changing their password, shown in stars, by simply deleting the stars and typing in a new one.  To accomplish this, use the following syntax:

myTextBox.Attributes("Value") = someString;

I can't think of a good reason ms built it this way at all.  oh for .net 2.0...


Tuesday, 16 March 2004 23:06:12 (GMT Standard Time, UTC+00:00)  #    Comments [0]  Asp.Net