Link to home
Start Free TrialLog in
Avatar of fusioninternet
fusioninternet

asked on

MVC3 Putting news article titles in links

Hi Experts,

I have a site with news articles and we want to be able to link to these news articles using the following format

http://www.website.com/news/24/this-is-the-news-today

Currently the news is served using this example address http://www.website.com/news/24

What i thought would be the way to do this was to use global.asax.cs and add a maproute that processes the url to ignore the additional text and just use the normal controller action and id.

Unfortunately for me i've got no experience in routes or url re-writing and Im open to suggestions if there is a more efficient way of doing what i want to achieve.

A couple of other examples doing similar to what I want to do are below

Regards
Steve

www.telegraph.co.uk%2Ftechnology%2Fsamsung%2F8684333%2FSamsung-Galaxy-Tab-10.1-hands-on.html

www.ndtv.com%2Farticle%2Fworld%2Flava-rivers-flow-out-of-hawaii-volcano-124607
ASKER CERTIFIED SOLUTION
Avatar of robasta
robasta
Flag of Zimbabwe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fusioninternet
fusioninternet

ASKER

Worked a treat, thanks very much.