您可以使用
ContentResult返回一个纯字符串:
public ActionResult Temp() { return Content("Hi there!");}
ContentResult默认情况下返回a
text/plain作为其contentType。这是可重载的,因此您还可以执行以下 *** 作:
return Content("<xml>This is poorly formatted xml.</xml>", "text/xml");
欢迎分享,转载请注明来源:内存溢出
您可以使用
ContentResult返回一个纯字符串:
public ActionResult Temp() { return Content("Hi there!");}
ContentResult默认情况下返回a
text/plain作为其contentType。这是可重载的,因此您还可以执行以下 *** 作:
return Content("<xml>This is poorly formatted xml.</xml>", "text/xml");
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)