1

I have a website which is running in asp.net webforms. I want to change this to MVC application(new modules will be developed in mvc pattern). For now I have the home page (default.aspx) page running in webforms and I would like to continue the same in MVC too as changing the page is not possible now. For instance if i type in www.example.com it has to go to www.example.com/default.aspx instead of getting to home controller and ActionResult Index().

I have created an MVC project for the same and adding the asp.net webforms modules to this application.

Is there a way to prevent this?

1 Answer 1

1

It should be a matter of removing your default route:

routes.MapRoute("Default", "{controller}/{action}/{id}", new { Controller = "Home", Action = "Index", id = UrlParameter.Optional }); 

Set it to:

routes.MapRoute("Default", "{controller}/{action}/{id}", new { id = UrlParameter.Optional }); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.