like URLs with attribute routing in ASP.NET MVC

added by jalpesh
8/23/2014 10:56:07 AM

1 Kicks, 139 Views

Before some time I have blogged about Attribute Routing features of ASP.NET MVC 5.x version. In this blog we are going to learn how we can create like URLs with attribute routing. As you know is one of the most popular questions answer site where you can ask questions and almost get the answers of your questions. So to create URLs like we need to understand structure of URLs of Stackoverflow. Let’s take example of following question URL which I have answered on and let’s take another example If you compare and understand structure of this URLs. You will know that there will be a two things which will be dynamic for this URLS. Here 24133693 and 23739256 denotes Id of question And can-i-use-signalr-2-x-with-net-4-0-if-i-am-using-microsoft-bcl-upgrading-from and the-advantage-of-formsauthentication-class-over-session-variable part denotes the title of the question.