Why are ASP.NET MVC templates only available for web application projects?

What is the reason that ASP.NET MVC templates are only available for web application projects and not for website projects?

+2


a source to share


2 answers


Website designs work by giving you the ability to compile your pages on the fly. This means that your code in code (or on a page) for those pages is not compiled until a request is made to view the page. The only reason this works is because your page and the code for it are related to each other.

In an ASP.NET MVC project, the user does not request a page. They enter a URL and the routing URL routes the request to the appropriate controller for processing. Since views and controllers are not implicitly linked like ASPX and Code-Behind files, they must be precompiled.



Therefore, a web application is the only option that will work for ASP.NET MVC.

+3


a source


ASP.NET MVC relies on compiling (i.e. you compile before deploying) the WAP model.



(Website projects are compiled in the default deployment.)

+2


a source







All Articles