views:

27

answers:

1
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?

A: 

Try something like this:

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

See here for a similar issue: StackOverflow

Tommy