In our application there is module A in which user need to select the dropdown list(E), corresponding to the data selected in dropdown list(E), the buttons will enable and disable accordingly(There are 3 buttons namely I,J,K).
By default value in the dropdown list(E) for page load the button I and J will enable and by selecting some other value in drop down list (E) the button I and K need to enable but instead the button I and J are enabled (as like default value)
Some time all the button will enable properly but we couldn't add the data by clicking the button which are enabled.(By deleting the browser history namely files,cookies,history,forms ....some time help us in fixing this issue)
Please help us in fixing this issue.
Note:
The above mentioned issue will not replicate every time.
We have checked and there is no problem with code but this issue may be caused because of the session or files,cookies,history,forms.
Loading
Zoran HorvatPosted Jul 27, 2011, 6:07 AM
Then, in this method, I set Enabled property values based on actual criteria (e.g. button1.Enabled = listbox1.SelectedValue != null), rather than on events, like listbox1_SelectedValueChanged. This method is good because it doesn't reflect the history of changes but only acts upon fixed rules that will always be the same. Hence, number of bugs that appear in it is more or less zero.
Off course, this method must be invoked from all change events raised by controls of interest, e.g. listbox1.SelectedValueChanged event handler would simply call EnableControls() and continue.
Zoran