Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp:ListItem Selected not working

Status
Not open for further replies.

tshad

Programmer
Jul 15, 2004
386
US
I have the following markup that doesn't work correctly.

I have the 2nd item selected but it still sets the 1st item as selected.

Why is that?

Code:
<asp:DropdownList ID="ddlActive" runat="server" >
   <asp:ListItem Value="">[All]</asp:ListItem>
   <asp:ListItem Value="1" Selected="True">Yes</asp:ListItem>
   <asp:ListItem Value="0" >No</asp:ListItem>
</asp:DropdownList>

Thanks,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top