Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Selected ListItem in DropDownList does not appear selected

0 views
Skip to first unread message

Nathan Sokalski

unread,
Oct 5, 2008, 6:29:52 PM10/5/08
to
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.
--
Nathan Sokalski
njsok...@hotmail.com
http://www.nathansokalski.com/


0 new messages