On aspx page call using JQuery
$.ajax({
url: '<%=ResolveUrl("~/URL of the page where your method is kept") %>'+ '&MethodName=name of the method defined code behind',
dataType: "json",
success: function (msg) {
"What to do is sucess"
}
});
Code behind on page load check
if (Request["MethodName"] == "YourMethod")
{
FillDetail();
}
Ex:
$.ajax({
url: '<%=ResolveUrl("~/event.aspx") %>'+ '&MethodName=Event',
dataType: "json",
success: function (msg) {
"What to do is sucess"
}
});
Code behind on page load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Request["MethodName"] == "Event")
{
FillDetail();
}
}
}