From your post, I'm assuming that you'ce converted to a WAP. The main difference between WAP and WSP is that a WAP builds all of the source files (pure code files that is, so not including the .aspx/ascx itself) into a DLL in the bin directory; in this
model, you compile first, then deploy. In a WSP, the source files are all deployed and compiled on the fly (including class files in App_Code); there isn't a compliation phase per say until you've deployed the site. (There are ways to pre-compile a WSP,
but I won't go into those here.)
When dealing with a WSP, Visual Studio gets type information from that on-the-fly compilation, by leveraging the runtime's compiler and then getting data from that output.
However, for WAP, we do it by building the project and using the same support as all other compiled project types. The designer files that we generate in a WAP are to keep the compiled binary in sync with the markup file contents. For example, if you have
<asp:Button ID="fooButton" runat="server"/> in the markup file, the designe file will have a member that corresponds to this. Then when you're in code-behind, you can reference fooButton through the regular language services in Visual Studio.
I hope this clarifies why the designer files are needed. :)
If this post has solved your problem, please select 'Mark as answer'
- Jimmy Lewis
Microsoft SDET
Visual Web Developer Team
Marked as answer by Dino He - MSFT on May 10, 2012 09:24 AM
Irfan186406
0 Points
1 Post
conversion of website project to webapp project
May 03, 2012 12:22 PM|LINK
Hi,
I am using VS2010.My client’s applications are in .Net 1.1 frame work .,I need to move them to 4.0.
While the conversion my manager told to right click on the project and do “convert to web app”
Why am supposed to do that?It generated some designer and code(auto-gen)
What if we don’t do conversion to web app
cYpH3r x3r0
Member
327 Points
107 Posts
Re: conversion of website project to webapp project
May 04, 2012 03:28 PM|LINK
this link (uploaded by my cooleague) explains clearly the difference between them. well i mostly use websites because they are easier to deploy :-)
http://www.codersbarn.com/post/2008/06/01/ASPNET-Web-Site-versus-Web-Application-Project.aspx
jamlew
Participant
1977 Points
256 Posts
Microsoft
Re: conversion of website project to webapp project
May 04, 2012 11:25 PM|LINK
http://vishaljoshi.blogspot.com/2009/08/web-application-project-vs-web-site.html is one of the more thorough comparisons of Web Application Projects (WAP) and Web Site Projects (WSP). It's a pretty good read.
From your post, I'm assuming that you'ce converted to a WAP. The main difference between WAP and WSP is that a WAP builds all of the source files (pure code files that is, so not including the .aspx/ascx itself) into a DLL in the bin directory; in this model, you compile first, then deploy. In a WSP, the source files are all deployed and compiled on the fly (including class files in App_Code); there isn't a compliation phase per say until you've deployed the site. (There are ways to pre-compile a WSP, but I won't go into those here.)
When dealing with a WSP, Visual Studio gets type information from that on-the-fly compilation, by leveraging the runtime's compiler and then getting data from that output.
However, for WAP, we do it by building the project and using the same support as all other compiled project types. The designer files that we generate in a WAP are to keep the compiled binary in sync with the markup file contents. For example, if you have <asp:Button ID="fooButton" runat="server"/> in the markup file, the designe file will have a member that corresponds to this. Then when you're in code-behind, you can reference fooButton through the regular language services in Visual Studio.
I hope this clarifies why the designer files are needed. :)
- Jimmy Lewis
Microsoft SDET
Visual Web Developer Team