using System; using System.Web.Mvc; using System.Web.Routing; namespace AJAX_With_MVC_Demo { public class GlobalApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { // Demos route routes.MapRoute("demos", "demos.mvc/{name}" , new { controller="demos", action = "ShowDemo" } , new { controller=@"[^\.]*"}); // "Standard" controller/action/id route routes.MapRoute("catchall", "{controller}.mvc/{action}/{id}" , new { controller="demo", action = "Index", id = "" } , new { controller = @"[^\.]*" }); } protected void Application_Start(object sender, EventArgs e) { RegisterRoutes(RouteTable.Routes); } } }