I have a custom FormsControl class that needs to set the value of a drop down field based on a value passed in. In the attachment, the code works fine for text fields, but doesn't work for drop down lists. The value I'm setting exists in the field list. but it's not persisting to the UI. I also am unable to set the index. The outputted <select /> element doesn't set any of its options to selected.
What is the proper way to set this field control value? My version is 6.1. Thanks.
Actually this has nothing to do with my question. I'm merely trying to set the value of the drop down list on the server side. No cascading dropdowns, etc. This is a single drop down list, and the value for it can be from any source (in my case, it's from a querystring parameter).
There has to be a better way than this, but my "hack" was to set the value at the end of the control's pipeline. I imagine something is setting the value AFTER the InitializeControls method is being called, and even in the FormControl's PreRender event (which I tried too, without luck).
Is there a cleaner way to do this? How I can I pre populate a drop down list?