You must Sign In to post a response.
  • Category: ASP.Net MVC

    Add Custom routes in mvc website

    Hi All,
    I want to add custom routes that url should be like

    http://domainname/user/username

    but I want userID on mvc action like

    public ActionResult(int? UserId)
    {
    ----
    return View();
    }

    So please advise me How can i Add this types of Routes

    Kind Regards
    Hari
  • #769468
    You may find a nice documentation in MSDN regarding this topic. Please go through it and see if it helps: docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/controllers-and-routing/creating-custom-routes-cs

    Regards,
    Asheej T K


  • Sign In to post your comments