Hiding .aspx from url in ASP.NET Framework 3.5
I would need to hide .aspx extensions and hold requests from the full url. I tried many solutions on the internet but failed.
After searching for a long time, I found one example code article (linked below): http://www.aspsnippets.com/Articles/How-to-hide-remove-ASPX-extension-in-URL-in-ASPNet.aspx
Now, in this article, it gave at startup that it will be built using Framework 3.5 and Service Pack 1 .
Even I checked Visual Studio 2008 which I have installed on my machine is Framework 3.5 and SP1. So I tried this app.
But there are some problems while I tried this solution.
those.:
- Since we need to import the Routing package (System.Web.Routing), I imported it, but it was not recognized. Then I manually specified the routing package from .NET Libararies .
- After that, it didn't recognize the ( routes.MapPageRoute ) method .
- This method is used to manually set an alias for the url, but it shows me the Blue Underline in that method and when it starts it shows me a message like ( MapPageRoute is not a member of System.Web.Routing.RouteCollection ).
so please guide me according to this solution.
+3
source to share