Reputation: 11155
I want to return a for a certain controller a blank page.
By blank, i mean blank!. with no Site.Master contents.
How? Thanks
Upvotes: 9
Views: 8673
Reputation: 4244
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;
}
Upvotes: 0
Reputation: 839
This will return an empty view
public ActionResult MyAction()
{
return new EmptyResult();
}
Upvotes: 23
Reputation: 190907
if you want no html or content, just return null
from your action method.
Upvotes: 0