Wednesday, 29 January 2020

How to get list through ajax jquery in c#

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

redirect to new page from jquery

  function foo(id) { var url = ' @Url . Action ( "Details" , "Branch" , new { id = "__id__" })'...