Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

View without layout in MVC

If you want to show view without any surrounding _Layout page, you can set Layout=null.

Code sample,

With following custom error view, you displayed without surrounding _Layout page.

    Layout = null;
<div class="alert alert-danger alert-dismissible fade show">
        <h5>Error! </h5>
        <h6>Something went wrong, contact admin, or try again</h6>

Invalid entry,please enter valid data.