Thursday, July 4, 2013

Razor actionlink control examples in MVC | redirecting to different controller action using actionlink in asp.net mvc

hi in this post i will show how using actionlink we can redirect to any action of any controller in asp.net MVC.

1. To redirect to same controller action.

 @Html.ActionLink("click here(Redirect to Same Controller Action)", "Index")

//Index is the controller's action name


2. To redirect to different controller action

 @Html.ActionLink("click here(Redirect to Other Controller Action)", "Index", "Home", null, null)

//Index is the HomeController action name

No comments:

Post a Comment