iasksillyquestions
iasksillyquestions

Reputation: 5690

.NET MVC - Call a controller Action from another controller action

I have a controller action which I would like to call another controller action.

Is this a valid thing to do. Is it possible?

Upvotes: 31

Views: 37814

Answers (2)

tvanfosson
tvanfosson

Reputation: 532445

As @Justice says you can use RedirectToAction. Also, you can use TempData to pass model (and other) data between controller actions.

Upvotes: 6

yfeldblum
yfeldblum

Reputation: 65435

Controller.RedirectToAction

Upvotes: 31

Related Questions