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.
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
rajendra singhPosted Dec 1, 2017, 5:18 AM
Ram NunnaPosted Dec 1, 2017, 3:20 AM
Rajkiran SwainPosted Nov 30, 2017, 8:09 AM
Laxmidhar SahooPosted Nov 30, 2017, 5:37 AM