Running ASP.Net MVC3 Alongside ASP.Net WebForms in the Same Project
Posted
by Sam Abraham
on Geeks with Blogs
See other posts from Geeks with Blogs
or by Sam Abraham
Published on Thu, 24 Feb 2011 18:05:57 GMT
Indexed on
2011/02/24
23:26 UTC
Read the original article
Hit count: 373
Filed under:
I previously blogged on running ASP.Net MVC in an ASP.Net WebForms project. My reference at the time was a freely-available PDF document by Scott Guthrie which covered the setup process in good detail.
As I am preparing references to share with our audience at my upcoming talk at the Deerfield Beach Coders Café on March 1st (http://www.fladotnet.com/Reg.aspx?EventID=514), I found a nice blog post by Scott Hanselman on running both ASP.Net 4.0 WebForms along with ASP.Net MVC 3.0 in the same project. You can access this article here.
Moreover, Scott later followed-up with a blog showing how to leverage NuGet to automate the setup of ASP.Net MVC3 in an existing ASP.Net WebForms project.
One frequent question that usually comes up when discussing this side-by-side setup is the loss of the convenient Visual Studio Solution Explorer context menu which enable us to easily create controllers and views with a few mouse clicks.
A good suggestion brought up in the comments section of Scott’s article presented a good work-around to this problem: Manually add the MVC Visual Studio Project Type GUID in your .sln solution file ({E53F8FEA-EAE0-44A6-8774-FFD645390401}) which then brings back the MVC-specific context menu functionality in solution explorer of the hybrid project. (Thank James Raden!)
© Geeks with Blogs or respective owner