hai,
how to bind the data to dropdownlist using json in Asp.net with out page refreshing when ever i am chnageing selection felids(dropdwwnlist)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Dec 23, 2013, 3:15 AM
hi,
Please refer
http://surajdeshpande.wordpress.com/2013/09/28/fill-a-dropdownlist-using-jquery-in-asp-net/
http://ruchitech.blogspot.in/2012/06/bind-dropdown-list-using-jsonjquery-in.html
hope this will help you.
Jaganathan BantheswaranPosted Dec 23, 2013, 2:45 AM
You can do this by using jquery ajax.
Call the loadItems function whenever the option is changed.
function loadItems() {
$.getJSON("/your/url/togetlist", null, function (data) {
var selectList = $("#yourddl"); //gets your ddl
$.each(data, function (index, optionData) {
var option = $(').text(optionData.Text).val(optionData.Value);
selectList.add(option, null);
});
});
}