I have a cascading DropDownList in an application. The contents of the cascading drop down list is small enough that there isn't a need to use AJAX/JSON to go to a database to get the content, I am just doing it in client side javascript like this (this is a subset of the data):
var val = typeList.value;
var applyTimeList = document.getElementById('clientid');
for (var q=applyTimeList.options.length; q>=0; q--)
applyTimeList.options[q]=null;
if (val == 'AutoRoute')
{
myEle = document.createElement('option') ;
myEle.value = 'SOP Processed';
myEle.text = 'SOP Processed';
applyTimeList.add(myEle) ;
} else if (val == 'Tier1Retention') {
myEle = document.createElement('option') ;
myEle.value = 'Study Processed';
myEle.text = 'Study Processed';
applyTimeList.add(myEle);
myEle = document.createElement('option') ;
myEle.value = 'Study Restored';
myEle.text = 'Study Restored';
applyTimeList.add(myEle);
myEle = document.createElement('option') ;
myEle.value = 'Study Archived';
myEle.text = 'Study Archived';
applyTimeList.add(myEle) ;
}
When I attempt to access the DropDownList on the server side I can't get the value selected, it always returns 0 as the index:
int index = RuleApplyTimeDropDownList.SelectedIndex;
How can I get the value selected on the Server side after modification?