ASP.NET MVC - is it possible to generate action links with multiple applications?
Is it possible to generate cross-app action links using an HTML helper class?
I have the following (both are separate VS2008 projects):
http: // mainwebsite / http: // mainwebsite / application
I would like to create a link at / mainwebsite / application / project TO / mainwebsite /. Is it possible? Or do I just need to copy the hyperlink?
addition:
My question also applies the other way around. This creates a link IN / mainwebsite / TO / mainwebsite / application /. I've already managed to do this by simulating the app name as the controller name:
<% =Html.ActionLink("ApplicationName","",new With {.Controller = "application" }) %>
a source to share
Yes, you can do it. The HTML Helper generates URLs using a routing system that is completely unaware of ASP.NET MVC and your application. If you have a route in the route table for another application, you can create a URL for it using the HTML helper. There is no rule that your route table can only contain routes for the current application, although you obviously need to be careful about how you order routes.
a source to share