ASP.NET: Path in place of URL arguments

Someone asked on Stack Overflow:

I’ve been taking URL arguments in ASP.NET like so:

www.mysite.com/thread.php?id=123

However, I’d like to use the cleaner method that you often see which looks like:

www.mysite.com/thread/123

How can I do this (get the arguments) in ASP.NET? What’s the usual procedure for setting up a system like this?

I posted the following answer, which was chosen as the accepted answer and received 1 upvote:

What that is called, is Url Rewriting. If you are using the ASP.NET-MVC Framework, you get this behavior by default, along with a design pattern that helps make developing it easier.

If you’re trying to shoehorn this onto an existing application, I recommend that you look into some url rewriting modules.

Notable comments

Nate (0 upvotes): In visual studio, a “website” is just a bunch of aspx files in a folder, in an “application” there is a .prj file that keeps track of what files are in the project.


Originally posted on Stack Overflow — 1 upvotes (accepted answer). Licensed under CC BY-SA.

signed letter b

Dad. Geek. Gamer. Software developer. Cloud user. Old Car enthusiast.  Blogger.


Top Posts


profile for Nate on Stack Exchange, a network of free, community-driven Q&A sites
a proud member of the blue team of 512KB club
Thoughts, opinions, and ideas shared here are my own. © 2026 Nate Bross.