views:

71

answers:

2

Hey, 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!

A: 

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.

mark123
As jamesaharvey said I'd like to know the reason. Can you explain why you want to do this? There's most likely a better way.
mark123
+1  A: 

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.

Martin