on dropdown change calling Ajax one partial view appending on one div
@Html.TextBox("ControlValue", null, new { @data_val = "true", @data_val_length = "max lenth valtn", @data_val_length_max = "10", @data_val_regex = "regex validntn error msg", @data_val_regex_pattern = "^[0-9]*$"})
@Html.ValidationMessage("ControlValue")
$.ajax({
type: 'POST',
headers: { 'VerificationToken': $("#forgeryToken").val() },
url: "@Url.Action("GetReportParameter")",
cache: false,
data: { rptID: $(this).val(), schID: 0, schType: $('#ddlSchType').val(), rptType: $("#ddlrptType").val() },
success: function (data) {
$('#divReportParameter').html(data);
$.validator.unobtrusive.parse("#frmScheduler");
}
})
this is how i am appending validation also
this validation is working with normal request means
if i am calling
@Html.Action("Actionname")
@Html.Partial("Actionname",Model)
validation is working
but in case of Ajax its not working
What I have tried:
normal request working but in case of Ajax its not working