user167698
user167698

Reputation: 1863

MVC Navigate to different controller view

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

Upvotes: 10

Views: 12205

Answers (1)

Arnis Lapsa
Arnis Lapsa

Reputation: 47567

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).

Upvotes: 18

Related Questions