In addition to the "city", select is a dynamicdropdown control. dynamicdropdown specifies to monitor a control. When a client event of the monitored control occurs, XMLHTTP is used to send data back to the server, the request event of dynamicdropdown on the server will be triggered, and the list options can be controlled in the request event processing program. A dynamicdropdown onchange can also trigger another dynamicdropdown request event. For example, the Select in the second line will be affected by the Select in the first line.
Usage:
Set monitoredcontrol and specify the control to be monitored. That is, the PostBack of XMLHTTP is triggered by this control.
Set monitoredclientevent to specify which client event of the monitored control triggers PostBack. The default value is onchange.
When a client event specified by the monitored control is triggered, XMLHTTP is called to submit data to the page. The dynamicdropdown control triggers the request event on the server. in the request event, the sender parameter is the reference of the control, and the E parameter contains the value of the monitored control. call the additem method of the control to add list items to the control client.
You can access the text and value attributes like dropdownlist.
Demo source code