There are two ways to initialize a TextBox whose
TextMode is "password" with a default password:
-
<asp:TextBox TextMode="Password" id="txtPwd" RunAt="server"/>
<script language="C#" runat="server">
void Page_Load (Object sender, EventArgs e)
{
txtPwd.Attributes.Add ("value", "Sneha");
}
</script>
-
<asp:TextBox Value="Sneha" TextMode="Password" id="txtPwd" RunAt="server"/>