I want to return a for a certain controller a blank page.
By blank, i mean blank!. with no Site.Master contents.
How? Thanks
This will return an empty view
public ActionResult MyAction()
{
return new EmptyResult();
}
如果你不想要HTML或内容,只需从你的action方法返回null
。
Are you wanting to return a page that does not inherit from your master page? If so then in your view page, do the below
@{
Layout = null;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.