Populate HTML DropDownList using jQuery AJAX and JSON in C# and VB.Net

Last Reply 5 months ago By dharmendr

Posted 5 months ago

Hai all, I have problem with database connection with html dropdownlist. We know how to connect database with asp:dropdownlist.

<asp:DropDownList ID="dropdownlist1" runat="server" AppendDataBoundItems="true" DataSourceID="SqlDataSource1" DataTextField="DTF" DataValueField="DVF">
   <asp:ListItem Value="0"><--Select--></asp:ListItem>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Connection %>" SelectCommand="Select Statement">
</asp:SqlDataSource>

its working good.

my problem is

<select id = "dropdownlist1" name="dropdownlist1" >
     <option value="0"><--Select--></option>               
</select>	

how to database connection with above html dropdownlist..

please help me.

You are viewing reply posted by: dharmendr 5 months ago.
Posted 5 months ago

Hi nagaraju60,

This is html controls. So for that you have to make ajax call. For this refer the below article.

Populate (Bind) ASP.Net DropDownList using jQuery AJAX and JSON in C# and VB.Net

I agree, here is the link: http://e-iceblue.com/free-api