1

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?

DaveRandom
88.8k11 gold badges160 silver badges174 bronze badges
asked Dec 30, 2009 at 19:11
0

4 Answers 4

4

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).

answered Dec 30, 2009 at 19:13
Sign up to request clarification or add additional context in comments.

2 Comments

Of note, you'll need .NET 3.51 or higher to use it.
It's actually .NET 3.5 Service Pack 1 that you need (not 3.51 because there's no such thing :) )
0

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.

answered Dec 30, 2009 at 19:15

Comments

0

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

answered Dec 30, 2009 at 19:15

Comments

0

As others have said routing is now built into .net 4 and can be used for both mvc and web forms. ScottGu has a post about how to use routing in webforms and can be found here.

Hope it helps.

answered Jan 8, 2011 at 13:00

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.