Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Integrate ASP.Net Webforms website with an ASP.Net MVC web application?

How would I run both of them under one main website, say www.example.com, which is written and deployed using a Visual Studio ASP.Net MVC web application project, and where an ASP.Net Web Forms website, would run from a subdirectory of the main site, say www.example.com/myapp?

like image 910
reddi.eth Avatar asked Feb 06 '09 10:02

reddi.eth


People also ask

Can you mix webforms and MVC?

Luckily, the answer is yes. Combining ASP.NET Webforms and ASP.NET MVC in one application is possible—in fact, it is quite easy. The reason for this is that the ASP.NET MVC framework has been built on top of ASP.NET.

Can we use ASPX page in MVC?

If you add a plain ASPX page to an ASP.NET MVC project, well, it just works like a charm without any changes to the configuration. If you invoke the ASPX page, the ASPX page is processed with viewstate and postbacks.

Can I use Web API with ASP.NET webform?

Although ASP.NET Web API is packaged with ASP.NET MVC, it is easy to add Web API to a traditional ASP.NET Web Forms application. To use Web API in a Web Forms application, there are two main steps: Add a Web API controller that derives from the ApiController class. Add a route table to the Application_Start method.

How do I convert ASPX to MVC?

The following steps help you use the Syncfusion Project Conversion in the existing ASP.NET MVC Project. Open an existing Microsoft MVC Project or create a new Microsoft MVC Project. Right-click on Project and select Syncfusion VS Extensions and choose the Convert to Syncfusion MVC (Web) Application.


1 Answers

See Hanselman's blog post. The basic idea is that you add a regular WebForm to your MVC project, then tell the routing engine to ignore that path when doing MVC routing.

like image 114
tvanfosson Avatar answered Sep 21 '22 16:09

tvanfosson