4
Reply

Getting a 404 Note found - ajax

Hector Gerena

Hector Gerena

Nov 29 2017 9:10 PM
193
I'm getting a 404 not found whe calling a codebehind c# menthod.  Here is my jquery-ajax
 
<script language="javascript" type="text/javascript">
$(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('');
}
});
});
</script>
 
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. 
 

Answers (4)