<div class="col-sm-2"> <div class="form-group"> <label for="custid" class="col-sm-12 control-label">Customer ID</label> <div class="col-sm-10"> <div class="input-group"> <select id="ddl_Custid" name="ddl_Custid" class="form-control dropdown " style="height:33px" tabindex="17"></select> </div> </div> </div> </div>
$.ajax({ type: 'GET', url: '@Url.Action("GetReport", "Report")', dataType: 'json', data: { id: $("#ddl_Custid").val() }, success: function (datas, status) { var duplicate = []; $("#ddl_Custid").append('<option value="-1">' + "-Select-" + '</option>'); $.each(datas, function (i, data) { if (duplicate.indexOf(data.fld_cust_id) == -1) { $("#ddl_Custid").append('<option value="' + data.fld_cust_id + '">' + data.fld_cust_id + '</option>'); duplicate.push(data.fld_cust_id); } }); } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)