Daniel
Daniel

Reputation: 2948

ASP.NET MVC + WebForms

I've been searching how to add webforms to MVC project but there lots of sites explaining only how to add MVC to an existing webforms project.

Is there a way to do that ? Maybe need to add some code at Web.Config ? The .aspx.cs can't find any control on the .aspx webpage, that's the trouble !

Thanks!

Upvotes: 0

Views: 289

Answers (2)

Martin
Martin

Reputation: 11041

It irks me to post this ... but I went Add New Item ... and added an Ajax Web Form into an MVC 2 project and the code behind was added and linked to the web form.

Upvotes: 1

mark123
mark123

Reputation: 1063

You can add a WebForm to your MVC project and have it work. You can also add WebForm controls to an MVC view as long as you have a <form runat="server"> around it.

Upvotes: 1

Related Questions