Skip to content

Instantly share code, notes, and snippets.

@yemrekeskin
Created June 29, 2013 14:14
Show Gist options
  • Save yemrekeskin/5891255 to your computer and use it in GitHub Desktop.
Save yemrekeskin/5891255 to your computer and use it in GitHub Desktop.
using System.Web.Mvc;
namespace CoreMvcApplication
{
public class VideoChannelAreaRegistration
: AreaRegistration
{
public override string AreaName
{
get
{
return "videoChannel";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"videoChannel_default",
"videoChannel/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "videoChannel.Controllers" }
);
}
}
}
// links for layout
@Html.ActionLink("Home", "Index", "Home", new { Area = "" }, null)
@Html.ActionLink("About", "About", "Home", new { Area = "" }, null)
@Html.ActionLink("Contact", "Contact", "Home", new { Area = "" }, null)
@Html.ActionLink("Forum", "Index", "Home", new { Area = "forum" }, null)
@Html.ActionLink("VideoChannel", "Index", "Home", new { Area = "videoChannel" }, null)
@Html.ActionLink("Blog", "Index", "Home", new { Area = "blog" }, null)
@Html.ActionLink("Magazine", "Index", "Home", new { Area = "magazine" }, null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment