Last post May 04, 2012 07:25 PM by jamlew
May 03, 2012 08:22 AM|Irfan186406|LINK
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
May 04, 2012 11:28 AM|cYpH3r x3r0|LINK
this link (uploaded by my cooleague) explains clearly the difference between them. well i mostly use websites because they are easier to deploy :-)
May 04, 2012 07:25 PM|jamlew|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. :)