Selected ListItem in DropDownList does not appear selected

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nathan Sokalski

    Selected ListItem in DropDownList does not appear selected

    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$cph Content$dtpBoth AMPM$ddlAMPM"
    id="ctl00_cphCo ntent_dtpBothAM PM_ddlAMPM">
    <option value="AM">AM</option>
    <option selected="selec ted" 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="selec ted"
    attribute. Why is it not appearing selected like all the other DropDownLists
    I set the SelectedIndex for? Thanks.
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。



Working...