I'm trying to initialize the TextBox with the Password TextMode in my C# code. I do it in Page_Load function. But after the output in a browser there is no text.
this.passwordTextBox.Text = this.GetData().Password;
this.confirmPasswordTextBox.Text = this.GetData().Password;
How can I assing a value to this property?
You can set the password using:
this.passwordTextBox.Attributes["value"] = this.GetData().Password;
or
this.passwordTextBox.Attributes.Add("value", this.GetData().Password);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.