0
new ViewResult() { ViewName = "Error_403" };

in this case .net looks through current controller view directory (~/Views/Home/) and in shared (~/Views/Shared/)

Is there any way to point to specific directory right here ViewName = @"Errors\Error_403"?
Or may be any other simple solutions?

zerkms
  • 249,484
  • 69
  • 436
  • 539

1 Answers1

0

Try something like this:

   New ViewResult(){ViewName="~/Views/SomeDir/Error_403.aspx"};

See here for a similar issue: StackOverflow

Community
  • 1
  • 1
Tommy
  • 39,592
  • 10
  • 90
  • 121