Reputation: 4862
I have a navigation on my _Layout.cshtml
. How can i hide it for some views/urls? Do not want to use javascript for this problem.
Upvotes: 0
Views: 1099
Reputation: 9411
Alternatively you can use a model for your layout page but from my experience it isn't worth the hassle.
Update - Example Using A Model in Layout
You essentially use a base model which is used for your layout and your view models inherit from it. Here's a link to another SO question with example code.
Upvotes: 3