iasksillyquestions
iasksillyquestions

Reputation: 5689

.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: 37815

Answers (2)

tvanfosson
tvanfosson

Reputation: 532665

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: 65445

Controller.RedirectToAction

Upvotes: 31

Related Questions