There are 1 entries for the tag Razor

Skipping rendering a section in ASP.NET MVC / Razor layouts

Today I had an interesting situation with ASP.NET MVC Razor views. I was dynamically switching layouts based on the host header, and for one layout in particular I wanted to use the layout file to exercise more control of the site than is probably usual. The reason for this was that this one particular layout was aimed at mobile devices, and so I wanted to skip rendering a couple of the optional sections that the site had to save on a bit of bandwidth. The views contained standard @section footer { STUFF BE HERE! } type...