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

Last Reply 11 months ago By dharmendr

Posted 11 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:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Connection %>" SelectCommand="Select Statement">

its working good.

my problem is

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

how to database connection with above html dropdownlist..

please help me.

You are viewing reply posted by: dharmendr 11 months ago.
Posted 11 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: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html