ASP.NET: Maintain an entered password in a TextBox
From Wiki
Summary: When a postback occurs, any TextBoxes which have their TextMode set to Password will be cleared and the user will have to retype their password. Here is a workaround.
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- If Page.IsPostBack Then
- TextBox1.Attributes.Add("value", TextBox1.Text)
- End If
- End Sub
This Hack is part of the ASP.NET Hacks collection


