10

I'm having trouble navigating to a different controller view from another controller action. e.g. return view("edit", "profile", profile);

I'm trying to navigate from the account controller to the edit view in the profile controller.

Any suggestions?

Thanks, -Mike

1 Answer 1

18

Try this:

RedirectToAction("Edit", "Profile", new {id = 1, otherParam = "foo"});  

This won't render view of another controller - but it will navigate to action of another controller (which is supposed to render view you are looking for).

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

1 Comment

I also want the view to be rendered. But How?

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.