I have a drop down list In which value comes from data base .i want my top value show which id are 3 .
e.g my drop down list after bind
<asp:DropDownList ID="DDl1" runat="server">
<asp:ListItem></asp:ListItem>
<asp:ListItem value="1">001</asp:ListItem>
<asp:ListItem value="2">002</asp:ListItem>
<asp:ListItem value="3">003</asp:ListItem>
<asp:ListItem value="4">004</asp:ListItem>
</asp:DropDownList>
Means first value are 001 but I want my show value in drop down is 003
I am doing following code but can’t give me the first value=003 in dropdown please help me how I solved it please help me following my code.
$('#DDl1').find('option[value="3"]').insertBefore.$('# DDl1').find('option:eq(1)');
please help me how i solved it