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 stackoverflow.com like URLs with attribute routing.
As you know www.stackoverflow.com 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 www.stackoverflow.com we need to understand structure of URLs of Stackoverflow. Let’s take example of following question URL which I have answered on stackoverflow.com
http://stackoverflow.com/questions/24133693/can-i-use-signalr-2-x-with-net-4-0-if-i-am-using-microsoft-bcl-upgrading-from
and let’s take another example
http://stackoverflow.com/questions/23739256/the-advantage-of-formsauthentication-class-over-session-variable
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.
As you know www.stackoverflow.com 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 www.stackoverflow.com we need to understand structure of URLs of Stackoverflow. Let’s take example of following question URL which I have answered on stackoverflow.com
http://stackoverflow.com/questions/24133693/can-i-use-signalr-2-x-with-net-4-0-if-i-am-using-microsoft-bcl-upgrading-from
and let’s take another example
http://stackoverflow.com/questions/23739256/the-advantage-of-formsauthentication-class-over-session-variable
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.