If your method is in code behind file means aspx.cs file then you can call that method using jQuery like
$(document).ready(function () {
$.ajax({
type: 'POST',
url: 'Default.aspx/MethodInAspxFile',
data: "{'param':'value'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
alert(msg);
}
});
});
and method in your aspx.cs file looks like
[WebMethod]
public static DataSet MethodInAspxFile(string param)
{
DataSet ds = new DataSet();
return ds;
}