Of code and color

personal weblog of Alex Gyoshev

asp:TextBoxes for passwords protect you from yourself!

I.e. the Text property is not rendered.

<asp:TextBox runat="server" ID="TextBox1" Text="Sample text" TextMode="Password" />

How to hack work-around it? Use the HTML value property.

<asp:TextBox runat="server" ID="TextBox1" value="Sample text" TextMode="Password" />

It’s lovely how ASP.NET looks after you.