Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- routes.MapRoute(
- name: "slug",
- url: "{slug}",
- defaults: new { controller = "Home", action = "show" },
- constraints: new { slug = ".+" });
- public async Task<ActionResult> Show(string slug)
- {
- return RedirectToRoute(ProfileControllerRoute.GetIndex, new { slug = slug});
- }
- [Route("GetIndex", Name = ProfileControllerRoute.GetIndex)]
- public ActionResult Index(int? page, string slug = null)
Add Comment
Please, Sign In to add comment