我是一名初学者,下面这段代码我在vs.net2003下webform1.aspx程序编辑(在html下),为什么编译通不过,请高手指点,谢谢。。
〈html〉
   <head>
     <title>Inserting ASP.NET code Example</title>
    </head>
  <body>
    Line1:First HTML Line<br/>
    Line2:Second HTML Line<br/>
   <script language="c#" runat="server">
   void Page_Load()
   {
     Response.Write("First ASP.NET Line<br/>")
   }
  </script>
      </body>
  </html>    编译提示response.write出错,哪儿的原因呢?

解决方案 »

  1.   

    Response.Write("First ASP.NET Line\r\n")
      

  2.   

    〈html〉// 应该为<html>注意尖括号
       <head>
         <title>Inserting ASP.NET code Example</title>
        </head>
      <body>
        Line1:First HTML Line<br/>
        Line2:Second HTML Line<br/>
       <script language="c#" runat="server">
       void Page_Load()
       {
         Response.Write("First ASP.NET Line<br/>") // 这一行少了个分号
       }
      </script>
          </body>
      </html>
      

  3.   

    〈html〉
    改成
    <html>Response.Write("First ASP.NET Line<br/>")
    改成
    Response.Write("First ASP.NET Line<br/>");
      

  4.   

    html〉
    改成
    <html>Response.Write("First ASP.NET Line<br/>")
    改成
    Response.Write("First ASP.NET Line<br/>");