Say I am on Module1 -> Controller1 -> View1.
In View1, I want to add a regular hyperlink to Module2 -> Controller2 -> View2.
How do I do that?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In ASP.NET MVC links point to action on a controller, not to a view. View can (but not have to be) returned from a given action as a result.
So, if your View2 is returned from eg. action MyAction on Controller2 sitting in Module2, then you can easily add a link to that action from anywhere by writing:
or
whichever looks better for you. There are a couple of other possible overrides.
The Area route property is used in Orchard to specify the target module name.