Can you use mvc controllers in an asp.net app?
My project is a web application project in asp.net 4.0. I've taken the steps to be able to add razor '.cshtml' pages. Can I also add mvc controllers for those files or for '.a开发者_开发问答spx' pages somehow?
Yes, you should be able to do that. Refer to following article ( http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNET4WebFormsApplications.aspx)
Yes MVC and WebForms can co-exist.
A good overview is here, though not written for MVC 3 the concepts should be the same.
精彩评论