dynamic DropDownList set Selected = true

cynthiapanda

New Member
\[code\]<asp:DropDownList ID="ddlOptionDependant" runat="server" AutoPostBack="True" DataSourceID="sdsOptionDependant" DataTextField="product_option_name" DataValueField="product_option_id" AppendDataBoundItems="True"> <asp:ListItem Value="http://stackoverflow.com/questions/14514089/0" Text="None"></asp:ListItem></asp:DropDownList>\[/code\]This DropDownList is built from a Query,I need to dynamically check the product_option_id and when I find a match set that match to the selected= true
 
Back
Top