-
Notifications
You must be signed in to change notification settings - Fork 0
/
RouteConfig.cs
101 lines (86 loc) · 3.05 KB
/
RouteConfig.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace _0110Work
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
//routes.MapRoute(
// name: "Default",
// url: "{controller}/{action}/{id}",
// defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
//);
routes.MapRoute(
name: "Homepage",
url: "",
defaults: new { controller = "Home", action = "Index" }
);
routes.MapRoute(
name: "ArticleList",
url: "ArticleList",
defaults: new { controller = "Home", action = "ArticleList" }
);
routes.MapRoute(
name: "Admin",
url: "Admin",
defaults: new { controller = "Home", action = "BackArticleList" }
);
routes.MapRoute(
name: "CreateArticle",
url: "Admin/CreateArticle",
defaults: new { controller = "Home", action = "CreateArticle" }
);
routes.MapRoute(
name: "UploadEditorImage",
url: "Admin/UploadEditorImage",
defaults: new { controller = "Home", action = "UploadEditorImage" }
);
routes.MapRoute(
name: "EditArticle",
url: "Admin/EditArticle/{aId}",
defaults: new { controller = "Home", action = "EditArticle"}
);
routes.MapRoute(
name: "DeleteArticle",
url: "Admin/DeleteArticle",
defaults: new { controller = "Home", action = "DeleteArticle"}
);
routes.MapRoute(
name: "CheckTitle",
url: "Admin/CheckTitle",
defaults: new { controller = "Home", action = "CheckTitle" }
);
routes.MapRoute(
name: "Article",
url: "Article/{title}",
defaults: new { controller = "Home", action = "Article" }
);
routes.MapRoute(
name: "LoginIn",
url: "LoginIn",
defaults: new { controller = "Home", action = "LoginIn" }
);
routes.MapRoute(
name: "LoginOut",
url: "LoginOut",
defaults: new { controller = "Home", action = "LoginOut" }
);
routes.MapRoute(
name: "GGGGG",
url: "GGGGG",
defaults: new { controller = "Home", action = "GGGGG" }
);
routes.MapRoute(
name: "SOSOevents",
url: "SOSOevents",
defaults: new { controller = "Home", action = "SOSOevents" }
);
}
}
}