Asp.net MVC3 and jQuery AJAX tutorial

I need a very detailed ebook / tutorial / video in a very simple language for jQuery AJAX and JSON with asp.net MVC3. I was googling, but could not find anyone good. Please send me the links.

Thank.

+5
source share
5 answers

On the client side, use $. ajax :

$.ajax({
   type: "POST",
   url: "users/save",
   data: "name=John&location=Boston",
   success: function(msg){
     alert( "Data Saved: " + msg );
   }

From the ajax handle on the server side:

public ActionResult Save(string name, string location)
{
  //Save data

  return new JsonResult(){Data = "User was saved!"};
}

Use JsonResult to return a json string to the client and JSON.parse to parse the client side json string.

ajax, $.ajax JsonResult, ajax, {data:"jsonString", messagess: [], redirect_url } ..

.

+8

MVCConf, (@Mallioch). , .

+1

.

:

jQuery Ajax ASP.NET MVC

JavaScript, , , .

. javascript , AJAX.

, -, , JavaScript, Cookbook jQuery.

.., - jQuery/JS, .

: : Javascript, Good Parts. , . MSDN, 2007 :

JavaScript: - -

, JavaScript.

+1
0

All Articles