@Html.DropDownListFor(x => x.Source, new SelectList(Model.SourceList, "Code", "Text"), "Select", new { @id = "ddlSourceId", @class = "form-control" })
function AddDynamicControl() {
debugger;
$("#DynamicControl").append(' ');
};
$d(function () {
$d('#txtSTD').datetimepicker();
});
var $d = jQuery.noConflict();
$d(function () {
$d('#txtDateTime').datetimepicker();
});
above i write code where i bind dropdown and i take i div and button when click on button then 4 control open using jquery so i want to know how to bind dynamic dropdownlist when i append in jquery
i want to bind same dropdown where i take in strongly type dropdownlist in mvc
and when i click on addbutton the calender will also open in std and datetime

Shraddha PatelPosted Apr 3, 2019, 6:03 AM
$.ajax({
type: "POST",
url: "test.aspx/GetDropDownDataWM",
data: '{name: "abc" }',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(data.d)
{
$.each(data.d, function (){
$(".myDropDownLisTId").append($("").val(this.KeyName).text(this.ValueName));
});
},
failure: function () {
alert("Failed!");
}
});
}
Sreekanth ReddyPosted Nov 26, 2018, 1:45 AM