Click here to Skip to main content
15,041,393 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,

In my asp.net page, I have Bind the values and enabled false to all the textboxes and dropdownlist. In the button click event I just give the coding for enabled true for all that controls. But Whenever i click that button all that controls are cleared. All the Dropdown list values are cleared. Why it is? I am using accordion panel. Please help me.
Posted

My guess would be that you are not testing

C#
if (!IsPostBack)
{
}


so your values are being cleared when you click the button.
   
In PageLoad event write the short code like

If(!IsPostBack)
{
    //write your code here to bind dropdown and textbox
}
   
Comments
devausha 19-Mar-13 1:16am
   
My codings are in if(!ispostpack) only
vishal.shimpi 19-Mar-13 7:15am
   
can you post your code

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