Click here to Skip to main content
11,437,638 members (29,526 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# MVC3
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 5-Feb-13 4:47am
DGKumar759
Comments
DGKumar at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^])

public static MvcHtmlString ActionLink(
    this HtmlHelper htmlHelper,
    string linkText,
    string actionName,
    string controllerName
)
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.150506.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100