asp.net服务器标记的格式不正确
这是代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = System.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>
<asp:Label ID="Label1"runat="server"Text="Label"></asp:Label><br />
<asp:Button ID="Button1"runat="server"Onclick="Button1_Click" Text="Button" /></div>
</form>
</body>
</html>
<asp:Label ID="Label1"runat="server"Text="Label"></asp:Label><br />
<asp:Button ID="Button1"runat="server"Onclick="Button1_Click" Text="Button" /></div>两句代码一直提示服务器标记的格式不正确是为什么?应该怎么改一下?