开发者

ASP.NET MVC + WebForms

开发者 https://www.devze.com 2022-12-17 19:36 出处:网络
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.

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 t开发者_如何转开发o 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!


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消