views:

151

answers:

3

I am in a situation where I want to restructure my site's urls. That is I have a page that lists the article names (with each article name as a link). As shown below:

ARTICLE1

ARTICLE2

ARTICLE3

Now if I click on an article I want the url to be as follows:

www.domain.com/ArticleID/name-of-the-Article

+4  A: 

The term your looking for is "url rewriting" or "routing".

I think the easy way will be to use the ASP.NET MVC routing, it works with Webforms too:

Using Routing With WebForms

Routing with ASP.NET Web Forms

CD
+1  A: 

I think you're looking for URL Rewriting, I'd also recomend UrlRewritingNet.

Yuriy Faktorovich
+1  A: 

Other possibilities that have worked well:

If your site is hosted on Windows Server 2008, you can use the Microsoft URL Rewrite Module for IIS 7.0.

A nice tool for older servers is Isapi Rewrite (look here - there's a free light version), very similar to Apache style mod_rewrite. May be a problem in shared hosting environments unless the provider is willing to install an Isapi dll.

Olaf