Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to navigate from one controller action to another controller action

which control is used for clicking purpose

when i tried to navigate from one controller action to another controller action more than controller i got this error resource can not found
Posted
Comments
DGKumar 5-Feb-13 9:55am    
My intention is
I have 3 folders
1-View
2-controller
3-model
in controller
3 controllers are there
each controller having 3 Action views

all view are having same Layout but controllers are different

when i click on top of layout the resource can not be found.

1 solution

Navigation means in general clicking on a link. Html.ActionLink[^] has proper overloads to generate link to an other controller's action. This is the basic one (http://msdn.microsoft.com/en-us/library/dd505070(v=vs.108).aspx[^])

C#
public static MvcHtmlString ActionLink(
    this HtmlHelper htmlHelper,
    string linkText,
    string actionName,
    string controllerName
)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900