You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

50 lines
1.5 KiB

using System.Web.Mvc;
using System.Web.Routing;
namespace Sevomin.WebFrontend
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
#region For Account Controller
routes.MapRoute(
name: "Login",
url: "login",
defaults: new { controller = "Account", action = "Login" }
);
routes.MapRoute(
name: "Logout",
url: "logout",
defaults: new { controller = "Account", action = "Logout" }
);
routes.MapRoute(
name: "Signup",
url: "new-account",
defaults: new { controller = "Account", action = "Signup" }
);
routes.MapRoute(
name: "UsernameValidator",
url: "check-username",
defaults: new { controller = "Account", action = "CheckUsername" }
);
#endregion
#region For Jobs
routes.MapRoute(
name: "NewJob",
url: "jobs/new-job",
defaults: new { controller = "Job", action = "NewJob" }
);
#endregion
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}