2009-04-10 3 views

Antwort

4

In Ihrem Controller-Aktion, verwenden Sie das in Json Verfahren gebaut:

return Json(new {name1 = "value1", name2 = "value2"}); 

Und Ihre jQuery Aufruf:

$.ajax({ 
    type: "POST", 
    url: "/your-url", 
    dataType: "json", 
    data: {data: to_send}, 
    success: function(msg) { 
     alert(msg.name1); 
     alert(msg.name2); 
    } 
}); 
//you can of course use another ajax function jQuery provides. 
Verwandte Themen