Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 977
user167698 Avatar asked Sep 03 '09 07:09

user167698


1 Answers

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

like image 57
Arnis Lapsa Avatar answered Nov 12 '22 02:11

Arnis Lapsa