<%@ Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">
    void page_load()
    {
        lblservertime.text = datetime.now.tostring();
    }
</script><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    welcome to asp.net2.0 the current date and time is:
    <asp:Label
     id="lblservertime"
      runat ="server" />
    </div>
    </form>
</body>
</html>
======================================
“/WebSite2”应用程序中的服务器错误。
--------------------------------------------------------------------------------编译错误 
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: CS0117: “System.Web.UI.WebControls.Label”并不包含“text”的定义源错误: 行 6:      void page_load()
行 7:      {
行 8:          lblservertime.text = datetime.now.tostring();行 9:      }
行 10: </script>