Thursday 3 May 2012

how to display value in password field in run time

i have a password field
 <asp:TextBox ID="tb" runat="server" TextMode="Password"></asp:TextBox>

C# code:

protected void Page_Load(object sender, EventArgs e)
    {
        tb.Attributes.Add("value", "abc123");
        tb.TextMode = TextBoxMode.SingleLine;
    }

No comments:

Post a Comment