Ignore viewstart in asp.net mvc razor views?

. This will show you how to use different _ViewStart files for different areas.

Up vote 2 down vote favorite share g+ share fb share tw.

When I setup my site I didn't anticipate sections with completely different layouts, so I put the ViewStart page in the root of the Views folder. Reorganizing all the views is gonna be a huge pain. Is there a way in specify in views to not inherit from the ViewStart page?

Asp. Net-mvc razor link|improve this question asked Sep 17 '11 at 21:39chobo1,93211124 84% accept rate.

First, take a look at this: How do I use a common _ViewStart in areas?. This will show you how to use different _ViewStart files for different areas. You can also override the Layout in each View if you'd like by simply setting the value in the page: @{ Layout = "~/Views/Shared/NewLayout.

Cshtml"; } Hope this helps.

– chobo Sep 19 '11 at 17:16 1 Yes, you can use Layout = ""; That seems to work. – Garrett Vlieger Sep 19 '11 at 19:50.

No idea what pain you are talking about but that's the whole point of the _ViewStart. Cshtml file: place one in some root view folder and all vies automatically inherit from it and AFAIK there is no way to tell some views not to use it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions