Reputation: 259
At the risk of sounding dumb.
I am trying to redirect to an action in another controller
here is my code
return this.RedirectToAction("s", "profile", new { id = CleanerId });
why is it not working?
"s" is the controller, "profile" is the action.
Upvotes: 3
Views: 3356
Reputation: 33
That is Very Simple to redirect one controller to another. if you are using are using Area concept then you can write this code like this: return RedirectToAction("LogIn", "Account", new { area = "Admin" }) and if you not use Area Concept then you can write this kind : return RedirectToAction("LogIn", "Account", new { area = "" }) I hope so this article useful to you.
Upvotes: 0
Reputation: 68687
Switch the s
and profile
, you have them reversed. RedirectToAction
Upvotes: 5