I’m developing a web app that has a database backend. In the past I’m done stuff like:
http://page.com/view.aspx?userid=123 to view user 123’s profile; using a querystring.
Is it considered good practice to use a querystring? Is there something else I should be doing?
I’m using C# 4.0 and ASP.net.
I think using query strings is perfectly fine, but there’s a case to be made for hackable URLs, in that they are more understandable to advanced users and are SEO-friendly. For example, I happen think
http://www.example.com/user/view/1234looks more intuitive thanhttp://www.example.com/view.aspx?user=1234.And you don’t have to alter your application to use pretty URLs if you’re using IIS 7.0. The URL Rewrite Module and a few rewriting rules should be enough.