I have a custom controller with an Index method that could possibly return multiple views depending on information passed in. I've noticed that no matter what view I return from the method, it always ends up going back to the default view (based on the editor name).
I have debugged the code and it does fire the return statement.
Actually, since posting the question, I've looked at the source code for LeBlender. In the LeBlenderController.cs file, line 66 and 67 (shown below) it's overwriting the view returned by the custom controller.
// Return the action result
actionResult.ViewName = frontView;
Issue with View returned from Custom Controller
I have a custom controller with an Index method that could possibly return multiple views depending on information passed in. I've noticed that no matter what view I return from the method, it always ends up going back to the default view (based on the editor name).
Hi Stephanie,
Can you shoe code of your controller?
Thanks, Alex
Hi Stephanie,
Could you run this in debug with a breakpoint within your if statement to see if that return statement fires?
Cheers,
J
I have debugged the code and it does fire the return statement.
Actually, since posting the question, I've looked at the source code for LeBlender. In the LeBlenderController.cs file, line 66 and 67 (shown below) it's overwriting the view returned by the custom controller.
is working on a reply...