I'm getting a 404 not found whe calling a codebehind c# menthod. Here is my jquery-ajax
$(document).ready(function () {
// debugger;
// alert('Passing by');
$('#CPH1_NADErbl1').click(function () {
alert("Inside the click function");
// var Selected = $("input[type='radio'][name='#CPH1_NADErbl1_0']:checked").val();
var Selected = $('#CPH1_NADErbl1 input:checked').val();
alert(Selected);
if (Selected == 1) {
alert("Inside the if condition when true");
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "/EIS/EISForm2.aspx.cs/EvalNADE",
dataType: "json",
success: function (response){
alert("success");
},
error: function(response)
{
alert("success failed");
}
});
} else {
alert("Inside the else condition when false");
$("#CPH1_<%= BudAssg%>").val('');
$("#CPH1_<%= MediCon%>").val('');
}
});
});
Here is my method ..
[WebMethod]
public void EvalNADE()
{
// int i = NADErbl1.SelectedIndex;
if (NADErbl1.SelectedIndex == 0)
{
string op1 = NADErbl1.SelectedItem.Text;
Bind_Emp();
Bind_MDECnd();
}
else if (NADErbl1.SelectedIndex == 1)
{
string op2 = NADErbl1.SelectedItem.Text;
//BudAssg.DataSource = null;
}
}
The method is not on the roort, is one level down in he EIS folder.

Laxmidhar SahooRank #383 · 6.6K reputationPosted Nov 30, 2017, 12:37 AM EST
Rajkiran SwainRank #165 · 14.4K reputationPosted Nov 30, 2017, 3:09 AM EST
Ram NunnaRank #8,962 · 213 reputationPosted Nov 30, 2017, 10:20 PM EST
rajendra singhRank #1,521 · 1K reputationPosted Dec 1, 2017, 12:18 AM EST