vote up 1 vote down star

i have a classic web project and i want to use asp.net mvc url routing just for rewrite url. is it possible without make much changes to my web project?

flag

3 Answers

vote up 4 vote down

Routing is not part of ASP.NET MVC - it's just part of ASP.NET itself. The good news is that it works with both MVC and WebForms (ASPX files). Check out Phil Haack's blog post on how to get this to work.

The only changes you need to make to your application are to add some configuration items to web.config and then register your routes in global.asax.cs (or global.asax.vb if you're using VB).

link|flag
Of note, you'll need .NET 3.51 or higher to use it. – Nissan Fan Dec 30 '09 at 19:14
i stand corrected – Jason Dec 30 '09 at 19:14
It's actually .NET 3.5 Service Pack 1 that you need (not 3.51 because there's no such thing :) ) – Eilon Dec 30 '09 at 19:16
vote up 0 vote down

System.Web.Routing, while shipped with ASP.NET MVC, is not technically part of the MVC framework. You can in fact use it as part of a regular ASP.NET webforms project.

link|flag
vote up 0 vote down

Definitly possible for .net 4.0, so like in 2 months. Also, google shows alot of content on how to do it today.

link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.