0
votes

in default asp.net mvc routing the address is something like this: http://domainname/Controllername/ActionName

my question is: can I encode the controller name and the action name in the previous URL?

1
What is "encode"? What is "previous URL"? - CodeCaster

1 Answers

-1
votes

Use Action Name Attribute :

    [ActionName("AnotherName")]
    public ActionResult Login()
    {
        return View("Login");
    }

And, Your Route Will now

//localhost:11727/users/AnotherName

Instead :

//localhost:11727/users/Login