0

The ControllerActionInvoker work with MVC controller to select an action. Is there something equivalent to choose a Razor Page between two pages?

I have two Razor Pages RazorPage1.cshtml and RazorPage2.cshtml. I want to use a logic to load either RazorPage1 or RazorPage2.

1 Answer 1

1

You can render then as Partial view base on you conditional logic in parent view

Or

In controller you can write a conditional logic to render different view based on view name

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.