MVC4 Action a jquery ajax ile veri göndermek.
HTML Tarafı:
MVC Tarafı:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MvcApplication2.Controllers
{
class theErkisi
{
public string ad { get; set; }
public string soyad { get; set; }
}
public class HomeController : Controller
{
//
// GET: /Home/
public ActionResult Index()
{
return View();
}
public JsonResult test(theErkisi erkisi)
{
System.Threading.Thread.Sleep(2000);//AZ BEKLE
string a = erkisi.ad;
string b = erkisi.soyad;
return Json(erkisi);
}
}
}





