I have _PageStart.cshtml in /View/ (so it's path is ~/View/_PageStart.cshtml)
During debugging, none of the breakpoints set in _PageStart are being hit.
I have _PageStart.cshtml in /View/ (so it's path is ~/View/_PageStart.cshtml)
During debugging, none of the breakpoints set in _PageStart are being hit.
By convention, file name should be _ViewStart.cshtml
in asp.net MVC view folder. It is similar as _PageStart.cshtml
in asp.net web form.
And if you return PartialView() from your controllers (instead of return View()), then _viewstart.cshtml will not be executed. [ Correct way to use _viewstart.cshtml and partial Razor views? ]