How to call Asp.Net page method using jQuery Ajax call?
In this tutorial,I am going to explain "How to call Asp.Net page method using jQuery Ajax call?". Before moving further let's understand the JQuery ajax call.
Basically javascript/JQuery library provides a way to call webmethod ,webservices and Web API's asynchronously.It means there will be no postback while calling method through ajax call.We can also say that it is an alternative of update panel.
Below is the basic syntax of JQuery ajax call.
Step 1: Open visual studio and create a Default.aspx page and write below markup under it.
Once you done by adding above code, write below code in HTML markup (Default.aspx)
Now create a webmethod in Default.aspx.cs.(Make sure webmethod are always static)
This is a simple ajax call to webmethod to get fullname of user.
Hope you liked this tutorial.Please provide your feedback.
Thanks.
How to call Asp.Net page method using jQuery Ajax call?
Reviewed by CodiBucket
on
07:40
Rating:
No comments: