密码文字框 [英] Password Text Box

查看:92
本文介绍了密码文字框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,我知道这真是个愚蠢的问题,但是我现在太累了,无法寻找它! ;-P
我想要一个密码字段,我不能使用TextBox,因为它没有可以将字符设置为点或星号的部分,所以我使用了HTML Input(Password)我该如何访问呢?我给它起了一个名字,但是Visual Studio无法识别它! :(


Mr.K

Hey guys, I know this is something really silly to ask but I''m too tired right now to look for it ! ;-P
I want to have a password field, I can''t use a TextBox because it doesn''t have the part where I can set the character to dot or star, so I used HTML Input(Password) how can I access it ? I ''ve given it a name but it''s not recognized by Visual Studio ! :(


Mr.K

推荐答案

可以使用文本框.将属性TextBoxMode设置为Password(http://msdn.microsoft .com/en-us/library/system.web.ui.webcontrols.textboxmode.aspx)
You can use the Textbox. Set Property TextBoxMode to Password (http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textboxmode.aspx)


如果要访问HTML输入,



您需要使用输入类型添加runat ="server"属性.现在,Visual Studio可以找到它.
If you want to access HTML input,



you need to add runat="server" attribute with input type. Now Visual Studio find it.


这篇关于密码文字框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆