Click here to Skip to main content
15,896,526 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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......
Posted

For security reason ,asp:text text="password" will empty its value when page get postback.
get idea
 
Share this answer
 
In the on text change event of the textbox write

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


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.
 
Share this answer
 
v3
Comments
bhagirathimfs 30-Apr-12 10:28am    
U can also change the visible property of the drop down when instand of enabled.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900