如何在文本模式为密码时在文本框中显示数据 [英] How to show data in Textbox when its textmode is password
本文介绍了如何在文本模式为密码时在文本框中显示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个问题当文本模式是密码时如何在文本框中显示数据.... ????
Hi,
I have a question How to show data in Textbox when its textmode is password....????
推荐答案
您能解释一下您的要求吗?我不明白你想要做什么。
当textmode
为TextBox
设置为密码
,它会显示 **** 之类的文字,因为它的设计方式就是这样。密码是一个安全的数据,不应该对每个人都可见,所以它显示如下。
如果你不想那样,使用textmode = SingleLine
。
如果这没有帮助,请解释一下要求。
Can you please explain your requirement. I don''t understand what you are trying to do.
Whentextmode
for aTextBox
is set topassword
, it will show text like **** because that''s how it is designed. Password is a secure data which should not be visible to everyone so it is shown like that.
If you do not want it that way, usetextmode = SingleLine
.
If this doesn''t help, explain the requirement.
txtPassword.Attributes["value"] = Convert.ToString(dt.Rows[0]["cPassword"]);
假设有2个txt框。一个有密码char = *和另一个是普通的txt框,加上一个按钮显示txtpassword中输入的实际字符一次按
见下文
Let say there is 2 txt box. One having password char = * and other one is normal txt box, plus one button to display the actual character typed in txtpassword once press
see below
private void button2_Click(object sender, EventArgs e)
{
txtNormal.Text = txtPassword.Text;
}
d
d
这篇关于如何在文本模式为密码时在文本框中显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文