asp.net mvc razor: How to directly access .cshtml page? -
how can directly access .cshtml file in asp.net mvc using razor view engine?
for example have url: localhost/home/about. load site inside "master" page.
i want load page without loading master page. thinking use url: localhost/home/about.cshtml. it's not working.
how can load view page without loading master page?
you can use method html.partial
this:
@html.partial("about")
edit
i might have missunderstood question. if want avoid including master page need remove layout.
add top of view:
@{ layout = null; }
Comments
Post a Comment