如何prevent从清理完毕后提交密码输入? [英] How to prevent a password input from clearing after submit?
本文介绍了如何prevent从清理完毕后提交密码输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果你有一个℃的网页; ASP:文本框的TextMode =密码... />
结果
你怎么能保持价值的回发后?
If you have a page with an <asp:TextBox TextMode="Password" ... />
.
How can you keep the value after a postback?
这是我的问题:结果
在我的应用程序的登录画面,你需要输入密码。
然后你点击提交,回发时,密码字段被清空了,我怎么能prevent密码字段从结算?
This is my problem:
At the registration screen of my app you need to enter a password.
Then you click submit, a postback occurs and the password fields are cleared, how can I prevent the password field from clearing?
干杯
推荐答案
您需要在Page_Load中还是在这样的按钮点击事件再次对其进行设置:
You require to set it again in page_load or in button click event like this :
string Password = txtPassword.Text;
txtPassword.Attributes.Add("value", Password);
这篇关于如何prevent从清理完毕后提交密码输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文