<script type="text/javascript">
function callcspage()
{
$.ajax({
type: "POST",
contentType: "text/xml",
url: "test.aspx/testmethod",
datatype: "xml",
data: "<form><t>rrt</form>",
//contentType: "application/json",
//url: "test.aspx/testmethod",
//datatype: "xml",
//data: "",
success: function (data) {
alert("success");
},
error: function (result) {
alert("error");
}
});
}
callcspage();
</script>
webmethod in .cs page
[System.Web.Services.WebMethod]
public static void testmethod()
{
int i = 2;
}
now i want to call this webmethod which is in .cs page but its not calling but it gives success message even tough it doesnt break at the breakpoint in .cs page