Click here to Skip to main content
16,012,611 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i want to create dropdown list in run time with dynamic data dropdown count may be change in depends on the table cout

What I have tried:

<asp:dropdonlist id="c" runat="server">
Posted
Updated 11-Aug-16 23:17pm
v2
Comments
Dil0500 11-Aug-16 2:17am    
Look into this:
http://www.aspsnippets.com/Articles/Populate-Bind-ASPNet-DropDownList-using-jQuery-AJAX-and-JSON-in-C-and-VBNet.aspx
Karthik_Mahalingam 11-Aug-16 3:09am    
exact link
post this as solution.
Nethaji chennai 11-Aug-16 4:04am    
dropdown list also create in runtime depends on the database
Karthik_Mahalingam 11-Aug-16 4:57am    
Always use  Reply  button, to post Comments/query to the user, sot that the user gets notified and responds to your text.

The answer has been given several times in comments so I'll refer to the first link posted, Populate (Bind) ASP.Net DropDownList using jQuery AJAX and JSON in C# and VB.Net[^].

Return json and then loop through and add options. Pretty easy actually. If you google for this you'll see tons of examples.
 
Share this answer
 
what about using a plugin ? Find Here
just apply required logic to bind data before plugin call. If you are using asp.net dropdownlist or find compatible plugin.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900