In VS2008, I go to File/New/Project, select ASP.NET Web Application and create a new project. 开发者_StackOverflow中文版
If I right-click on the newly created project, there is a menu item to Convert to Web Application.
I thought I just picked a Web Application. What exactly does the Convert to Web Application menu item do?
It will generate .designer file with controls from aspx/ascx file. If you have e.g. in you page control
<asp:Label ID="lbId" runat="server" />
in designer file it generates member
protected global::System.Web.UI.WebControls.Label lbId;
if you haven't this .designer file you cannot use controls from aspx page in code behind.
精彩评论