2010-11-20 7 views

Antwort

1

genannt Sie dies manuell tun könnte:

public ActionResult MyAction() { 
    return Content("this is a string literal, which can be HTML, XML, JSON, etc."); 
} 

Aber ich denke, ich, bevor eine tatsächliche JSON Rückkehr Objekt erinnern, obwohl ich es nie benutzt habe. Etwas wie:

public ActionResult MyAction() { 
    return Json(new {thing1="first thing", thing2="second thing"}); 
} 
Verwandte Themen