I want to create ASP.NET 4.0 dynamic pages loaded from my MS SQL server. Basically, it’s a list of locations with information. For example:
Location1 would have the page www.site.com/location/location1.aspx
Location44 would have the page www.site.com/location/location44.aspx
I don’t even know where to start with this, URL rewriting maybe?
Url rewriting addresses a different problem than what you are describing.
You can use an HttpHandler that handles requests to the path
locationand parse the last segment to get your lookup key then simply pass execution off to an .aspx. Although you are passing execution off to a general page, the url will remain as entered.I will provide an example. Give it a shot. here is a sample project
LocationHandler.cs
locations.aspx
web.config excerpt