Simple ASP.NET application.
I also have code in the
OnPreRender method that will enable or disable the second drop-down based on the value of the first drop-down. This is so that the value of the first drop-down can be selected in code (loading user settings).
My problem is:
- They then change a third drop-down that initiates a post back. After the post back the drop-downs are in the correct state (first value selected, second drop-down enabled).
- If they then click the back button, the second drop-down will no longer be enabled although it should be since there’s something selected in the first drop-down.
I’ve tried adding a startup script (that will set the correct state of the second-drop down) through
ClientScript.RegisterStartupScript, however when this gets called the first drop-down has a
, not what it actually is. My guess is that the value of the selection gets set after my start script (but still doesn’t call the
Any ideas on what to try?
The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you