Quantcast
Channel: RazorGenerator Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 525

Created Unassigned: Override view is not working [168]

$
0
0
I have a separate project in my solution that contains some Controllers and compiled views. I use those controllers for base classes to other controllers in my MVC application and the views are compiled using RazorGenerator.

Lets say B is Base Controller with non abstract action method SomeAction that returns View("_MyView"). _MyView.cshtml is compiled using RazorGenerator.

Lets say controller A inherits B but doesn't override SomeAction.

I've tried to make another view "~/Views/A/_MyView.cshtml" to override the default one, but it doesn't work. My question is how can I accomplish this?

ADDITIONAL INFO

1) I know that the views by default are searched in that order in those paths

"~/Views/{1}/{0}.cshtml",
"~/Views/{1}/{0}.vbhtml",
"~/Views/Shared/{0}.cshtml",
"~/Views/Shared/{0}.vbhtml"
2) Putting "~/Views/Shared/_MyView.cshtml" does override the view, but not only for controller A, but also for every other controller that inherits B

Viewing all articles
Browse latest Browse all 525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>