<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->ProtectedSub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load If IsPostBack Then IfNotString.IsNullOrEmpty(txtPassword.Text.Trim()) Then txtPassword.Attributes.Add("value", txtPassword.Text) EndIf EndIf End Sub
C#:
C#
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->protectedvoid Page_Load(object sender, EventArgs e) { if (IsPostBack) { if (!(String.IsNullOrEmpty(txtPassword.Text.Trim()))) { txtPassword.Attributes["value"] = txtPassword.Text; } } }