I have a problem like link text
All my links look like this: htp // site / controller / action / id
I just added an area called BackEnd .
My controller:
[ActionLinkArea("")] public class HomeController : Controller { public ActionResult Index() { return View(); } }
Now when I try to get the consortium url using
@Html.ActionLink<HomeController >(c => c.Index(), "Home")
Everything works fine, and url is htp: // site / HomeController / Index /
But when I use the extension method from Microsoft.Web.Mvc.dll
@Html.BuildUrlFromExpression<HomeController>(c => c.Index())
I get the URL htp: // site / BackEnd / HomeController / Index /
How can I get a URL without a scope using BuildUrlFromExpression, and why does ActionLink work fine, but you don't use the BuildUrlFromExpression expression?
source share