ASP.NET MVC3 Areas?

The RouteValues collection can take an area parameter. Just make it blank.

Up vote 2 down vote favorite share g+ share fb share tw.

I've recently been looking into the areas functionality for my application and had partial success transferring code into my first area. My question involves linking from inside an area to a location that isn't in an area. I've read the tutorial on how to link from one area to another, but while I still have code that isn't within an area how do I link to it?

Testing Link How do I make this code, which currently links to /myarea/home/index instead link to /home/index (not in an area). If this is against best practices I'd be interesting in reading about it, I'm still learning ASP. NET's version of Areas asp.

Net-mvc-3 link|improve this question asked Oct 11 '11 at 20:43Valchris56319 90% accept rate.

The RouteValues collection can take an area parameter. Just make it blank. New { area = "" }.

Simple quick answer, sad I didn't think of this myself, appreciated. – Valchris Oct 11 '11 at 20:49.

Link to an area: @Url. Action("Index","Home", new { area = "YourAreaName" } ) link to a place out of any area: @Url. Action("Index","Home", new { area = "" } ) A helpful list: @Html.

ActionLink("LinkText", "ActionName", new { area = "AreaName" }) @Html. ActionLink("LinkText", "ActionName", new { area = "" }) @Html. ActionLink("LinkText", "ActionName", "ControllerName", new { area = "AreaName" }, new { /* html attributes */ }) @Html.

ActionLink("LinkText", "ActionName", "ControllerName", new { area = "" }, new { /* html attributes */ }) Link Text Link Text Link Text Link Text.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions