Here is simplify method with example please read and practice carefully then definitely you'll do this.
The first method is using get method..
$.ajax({
url:"/Home/GetUserList", /// this is URL "HOME"- COntroller name, GetUserList-Method Name
type:"GET", /// define type GET or POST
datatype:"json", /// datatype format
Content-Type:"application/json",
data:{}
success:function(response){
alert("We got it user list").
}
error: function(response){
alert("we can't found the user list, there is something error");
}
})
No comments:
Post a Comment