如何使用Visual Studio 2008在ASP.NET中创建密码字段 [英] how to create a password field in asp.net using visual studio 2008

查看:60
本文介绍了如何使用Visual Studio 2008在ASP.NET中创建密码字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助我不知道如何创建密码字段.

我有两个文本框,一个用于用户名,一个用于密码..,在密码文本框中,我想在哈希表中显示密码.我看到了所有文本框属性,但无法对它们的任何passwrd字段属性进行优化.请帮帮我..

help i don''t know how to creat a password field .

i have two textboxes one for username and one for password.. and in password textbox i want to show the password in hashess. i see all textbox properties but can''t fine any passwrd field property their. pls help me..

推荐答案

使用属性
TextMode="Password"



例如:



ex :

<asp:textbox id="myTextBox" runat="server" textmode="Password" xmlns:asp="#unknown"></asp:textbox>


根据该 http://www.w3schools.com/aspnet /aspnet_textbox.asp [ ^ ],似乎对于ASP.NET控件,这是TextMode属性.

我认为,如果您使用HTML控件,则工具箱中将提供输入(密码).
According to that http://www.w3schools.com/aspnet/aspnet_textbox.asp[^], it seems that for ASP.NET control, this is the TextMode property.

I think that if you use HTML controls, that an input(password) is available in the toolbox.


选择您的文本框,然后进入属性窗口,找到TextMode属性,然后从列表中选择Password.默认情况下,TextMode显示SingleLine.或者您可以通过HTML模式轻松地在HTML源代码中设置密码文本框,然后将此标签添加到texbox HTML属性
Select your textbox and go propertise window find out the TextMode property and select Password from list. by default TextMode show SingleLine. or you can easily set password textbox from HTML Mode go HTML source and add this tag in your texbox HTML property
TextMode="Password"

中,例如

for example

<asp:TextBox ID="TextBox1" runat="server" TextMode="Password"></asp:TextBox>




谢谢




Thanks


这篇关于如何使用Visual Studio 2008在ASP.NET中创建密码字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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