WebForm中的TextBox控件作为密码框(如图1)时,需要把TextMode属性设置为Password(如图2),而且要在Page_Load中使用Attributes赋值。
protected void Page_Load(object sender, EventArgs e)
{
ReaderPassword.Attributes["value"] = ReaderPassword.Text;
}
学习自:
https://blog.csdn.net/y1535623813/article/details/75279885