2010-11-20 32 views

回答

1

你可以手動執行此操作:

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

但我覺得我記得以前的實際JSON返回的對象,雖然我從來沒有使用過它。例如:

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