你是不是把类的名字改成helloworld了?如果是这样,就把Inherits="sample.WebForm1"改成:
Inherits="sample.helloworld"

解决方案 »

  1.   

    书上的例子helloworld.aspx.cs代码如下:using System;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;namespace sample
    {
     public class WebForm1:System.Web.UI.Page
      {
       protected System.Web.UI.WebControls.Label Label1;
       
       public WebForm1()
        {
          Page.Init+=new System.EventHandler(Page_Init);
        }   public void Page_Load(object sender,System.EventArgs e)
        {
        }   private void Page_Init(object sender,EventArgs e)
        {
          InitializeComponent();
        }   private void InitializeComponent()
        {
          this.Load+=new System.EventHandler(this.Page_Load);
        }
      }
    }
      

  2.   

    helloworld.aspx代码如下:<%@Page Language="c#" Codebehind="helloworld.aspx.cs" Inherits="sample.WebForm1" %>
    <html>
       <body>
          <form id="form1" method="post" runat="server">
           <center>
              <asp:label id="my" runat="server" font-size="30">hello world</asp:label>
           </center>
          </form>
       </body>
    </html>
      

  3.   

    我猜也是 helloworld.aspx.cs文件没编译
    你新建一个项目 起一样的名子 然后再把代码贴进去编译就行了
      

  4.   

    helloworld.aspx.cs文件没编译!
      

  5.   

    刚学,有很多都还不清楚,我倒是找到出错的地方了!
    我把Codebehind="helloworld.aspx.cs" 一句改为src="helloworld.aspx.cs"就OK了!
    大家给我讲讲理由吧!
    我想知道在vs.net中如何编写代码,进行调试,谢谢!
      

  6.   

    上面这个我是在记事本里手工输入的,好慢!也不方便!我看vs.net中用新建asp.net应用程序中生成的文件有好几个,大家可不可以给我说说各自用途!AssemblyInfo.cs里面有一堆代码,不知何用?
    Global.asax
    Web.config
    WebForm1.aspx