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