Category Archives: ASP.Net

ASP.net MVC Creating SEO friendly URL (Routing)

I want to pass 2 parameters to my controller and wants to display it int the razor view . Task :  Change URL From : http://localhost:50842/Contracts/Index?first=Line1&second=Line2 To       :  http://localhost:50842/Contracts/Index/Line1/Line2 My Controller: My View : My Classic method is : Pass the URL as query string : http://localhost:50842/Contracts/Index?first=Line1&second=Line2 Here I am passing the parameters as… Read More »