Sebastian
Sebastian

Reputation: 972

override default search paths of cshtml files

I try to minify my javascript in the cshtml razor files and save it as viewname.min.cshtml. Is it possible to override the search when I call return View() or PartialView() in a controller to search first for a name.min.cshtml file?

Upvotes: 0

Views: 205

Answers (1)

SLaks
SLaks

Reputation: 887857

You need to register a RazorViewEngine with your own values for the ViewLocationFormats property.

Upvotes: 1

Related Questions