How to pass complex object from jquery to action controller in tag
I have a jquery code like this
function InitCell(row, column, value) {
var MyPerson = new Object();
MyPerson.ID = '123456789';
MyPerson.FirstNmae = 'abc';
MyPerson.LastName = 'def';
var html = "<a href='/test/Index/person =" + MyPerson +"></a>";
}
In addition I have a action controller like this
public class testController : Controller
{
//
// GET: /test/
public ActionResult Index(Person person)
{
return View();
}
}
class Person
{
public int ID { get; set; }
public string LastName { get; set; }
public string FirstName { get; set; }
public List<Person> Children { get; set; }
}