当触发下拉列表事件的选定索引更改时,则密码字段自动为空值 [英] when selected index change of dropdownlist event is fired then automatically password field getting empty value

查看:79
本文介绍了当触发下拉列表事件的选定索引更改时,则密码字段自动为空值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
请帮助我解决以下问题:
当dropdownlist选择的索引更改事件被触发时,我的密码字段会自动获取空值,但是在选择dropdownlist值之前,我会填写密码字段.

在此先感谢...

Hi all,
Plz help me for solving my following problem:
when dropdownlist selected index changed event is fire then my password field getting empty value automatically, but before selecting dropdownlist value i fillup the password field.

Thanks in advance......

推荐答案

出于安全原因,asp:text text ="password"将在页面回发时清空其值.
获得想法
For security reason ,asp:text text="password" will empty its value when page get postback.
get idea


在文本框的on text change事件中写入

In the on text change event of the textbox write

if(txtPassword.Text != String.Empty)
{
    dropdown.Enabled = true;
}
else
{
    dropdown.Enabled = false;
}



然后在on select change事件中输入密码文本的文本输入.
表单过帐发生时,密码文本自动为空

这里txtPassword是文本框的ID,而dropdown是下拉列表的ID.



And on the on select change event take the text input of the password text.
When Form post occurred the password text automatically gets empty

Here txtPassword is the id of the textbox and dropdown is the id of drop down.


这篇关于当触发下拉列表事件的选定索引更改时,则密码字段自动为空值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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