在线等了,如何给 textbox (Password 型) 赋值阿, 就是 赋值后显示为 ***** 这样的 rt 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 textbox 设置成为Password型的就可以 有属性的 首先设置TextBox的PasswordChar为“*”,然后直接赋值即可 TextBox.PasswordChar = '*'即可 属性栏中的PassWordchar后面写“*” PasswordChar 在哪阿 找不到 直接修改PasswordChar属性,然后赋值即可。 那你就在代码中写this.textBox1.PasswordChar=Convert.ToChar("*"); this.textBox1.PasswordChar ='*'最好放在Load事件中 错了是this.textBox1.PasswordChar='*'; private void Form1_Load(object sender, System.EventArgs e) { this.textBox1.PasswordChar='*'; } 应该是把TextBox的TextMode属性设置为Password吧 把TextBox的TextMode属性设置为Password PostBack的时候,如果TextBox的TextMode为Password的话,是没有value属性传递的,所以密码框是空的加入如下代码:private void Page_Load(object sender, System.EventArgs e) { Password.Attributes .Add ("value",Request["Password"]); //Password为TextBox的name } PasswordChar属性 在属性栏中呀 PasswordChar属性 想加什么符号就加什么符号,或者直接在form_load或者构造函数定义控件时设置PasswordChar属性 <asp:TextBox ID="txtPwd" Runat="server" TextMode="Password" value="123"></asp:TextBox> 属性中设置TextMode属性为"Password",找不着属性按"F4",或者在html页按照楼上所说的做修改 默认的password控件在打开页面时会清空的,要修改一个属性附值才有效 http://community.csdn.net/Expert/topic/4641/4641968.xml?temp=7.003421E-02你要的 TextBox.PasswordChar = '*'即可 这个很简单的<asp:TextBox ID="txtPwd" Runat="server" TextMode="Password" value="123"></asp:TextBox> DBHelper的三个方法 lock怎么没有起作用? 数据库打包 向用户控件传递参数的问题,第一个解决的得分 网页提交时提示说无法验证数据类型,怎么回事? 在C#下如何写一个dll,与C++下有什么不同? 请教关于利用.NET组件反射实现插件功能时,插件自身DLL调用的问题。 求 FormClosing事件的问题。 C#+sql server中关于Date与string数据转换时的迷惑 引用某个dll后,如何使用 用XmlTextReader如何获取XML某个元素的属性名称? C#问题
this.textBox1.PasswordChar=Convert.ToChar("*");
最好放在Load事件中
是this.textBox1.PasswordChar='*';
{
this.textBox1.PasswordChar='*';
}
private void Page_Load(object sender, System.EventArgs e)
{
Password.Attributes .Add ("value",Request["Password"]);
//Password为TextBox的name
}
<asp:TextBox ID="txtPwd" Runat="server" TextMode="Password" value="123"></asp:TextBox>