| 12345678910111213141516171819202122232425262728 |
- using System.Web.Http;
- using System.Web.Mvc;
- using System.Web.Routing;
- namespace WeOnlineApp
- {
- public class RouteConfig
- {
- public static void RegisterRoutes(RouteCollection routes)
- {
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
- routes.MapRoute("M", url: "M", defaults: new { controller = "MsgMonitor", action = "Index", id = UrlParameter.Optional });
- routes.MapRoute("Play", url: "P", defaults: new { controller = "Play", action = "Index", id = UrlParameter.Optional });
- //ASP.NET Web API Route Config
- routes.MapHttpRoute(
- name: "DefaultApi",
- routeTemplate: "api/{controller}/{id}",
- defaults: new { id = RouteParameter.Optional }
- );
- routes.MapRoute(
- name: "Default",
- url: "{controller}/{action}/{id}",
- defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
- );
- }
- }
- }
|