开发者

Initialize TextBox with the Password TextMode

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);

Setting the Value of a TextBox with TextMode=Password

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜