There will be an inherent problem if you change the <select> elements contents for a server control. The server control will restore the contents of the option list from viewstate and then apply whatever change was posted. So if you start with the options 1, 2 & 3, then change those options in javascript to 4, 5 & 6, the server side code will ignore the client side change in the list and restore the control with 1, 2 & 3. It will also attempt to apply the change (now you'll have either 4, 5 or 6 selected) but it can't find them in the current list so it will default back to the first option (1). This can cause erroneous index change events or other strange things to happen. If you want to be able to support this client-side option list change behavior, you'll have to use standard non-server form elements and manually capture the post values using the Request.Form collection. This is doing it old school style but it could be done.
-
Peter