N
Nathan Sokalski
I have a DropDownList in which I set the SelectedIndex property in my code.
However, when I run a debug it does not appear selected (actually, none of
the ListItems are even visible in the DropDownList until I click the arrow
to select one). However, when I do a view source it has the following:
<select name="ctl00$cphContent$dtpBothAMPM$ddlAMPM"
id="ctl00_cphContent_dtpBothAMPM_ddlAMPM">
<option value="AM">AM</option>
<option selected="selected" value="PM">PM</option>
</select>
As you can see, not only are the option tags there, but one of them (the one
I set to be selected in my codebehind) has the selected="selected"
attribute. Why is it not appearing selected like all the other DropDownLists
I set the SelectedIndex for? Thanks.
However, when I run a debug it does not appear selected (actually, none of
the ListItems are even visible in the DropDownList until I click the arrow
to select one). However, when I do a view source it has the following:
<select name="ctl00$cphContent$dtpBothAMPM$ddlAMPM"
id="ctl00_cphContent_dtpBothAMPM_ddlAMPM">
<option value="AM">AM</option>
<option selected="selected" value="PM">PM</option>
</select>
As you can see, not only are the option tags there, but one of them (the one
I set to be selected in my codebehind) has the selected="selected"
attribute. Why is it not appearing selected like all the other DropDownLists
I set the SelectedIndex for? Thanks.