Hi All
The code is written in MVC architecure.
I am using this script
<script type="text/javascript">
$(document).ready(function () {
$("#btnSubmit").click(function (e) {
e.preventDefault();
// var val = Json.Encode(Model);
$.ajax({
type: 'POST',
url: '../Apteka/UpdateParial',
data: JSON.stringify(@Html.Raw(Json.Encode(Model))),
contentType: 'application/json; charset=utf-8',
dataType: "json",
success: function (data) {
alert('Success');
}
});
});
});
</script>
My controller is
public ActionResult UpdateParial(AptekaReportModel aptekaReportModel)
{
aptekaReportModel.YearList = CommonFunctions.GetYear();
aptekaReportModel.MonthList = CommonFunctions.GetMonth();
// aptekaReportModel.RepresentativeTypeList = CommonFunctions.GetRepresentativeTypeList();
aptekaReportModel.IsSearch = true;
It is passing all everything except selected value in dropdown.
How to send the selected value of dropdown to controller from view using ajax call
Prashant Arora