Simple ASP.NET application.
I have two drop-down controls. In the first case, I have a JavaScript onChange event. JavaScript includes the second drop-down list and removes the value from it (the value selected in the first drop-down list). If they select the empty first value of the drop-down list, then the second drop-down menu will be disabled (and the reset options).
I also have code in the OnPreRender method that will enable or disable the second drop-down list depending on the value of the first drop-down list. This means that the value of the first drop-down list can be selected in the code (loading user settings).
My problem:
- The user selects something in the first drop-down list. The second drop-down list will be available through JavaScript.
- They then modify the third drop-down list that initiates the sending of the message. After returning the message, the drop-down lists are in the correct state (the first value is selected, the second drop-down menu is on).
- If they then click the "Back" button, the second drop-down list will no longer be included, although it should be, because something is selected in the first drop-down list.
I tried to add a start-up script (which will set the correct state of the second fall down) through ClientScript.RegisterStartupScript , however, when that succeeds, the first drop-down list has selectedIndex of 0 , and not what it really is. I assume that the selection value will be set after my script runs (but still does not call the onChange script).
Any ideas on what to try?
Ray
source share