نحوه لود پسورد در textbox در asp.net


If u set the TextBox1.Text="Something" for the textbox which is having TextMode Property is Password, it will not show the text.

We have to do some coding for that. The following code loads the text in the password field.


private void Page_Load(object sender, System.EventArgs e)
{
TextBox1.Text="Password";
TextBox1.TextMode=TextBoxMode.Password ;
TextBox1.Attributes.Add("Value","Password");
}

 

/ 0 نظر / 7 بازدید