c# - 此结束标记没有匹配的开始标记。我搞砸了某个地方。请帮我看看好吗?

标签 c# asp.net

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="StudentList" runat="server">
    <div>
        <asp:ListBox ID="lstStudents" runat="server" 
            onselectedindexchanged="lstStudents_SelectedIndexChanged">
        </asp:ListBox>
            <br />
        <asp:Label ID="lblOutput" runat="server" Text=""></asp:Label>

    </div>
    </form>
</body>
</html>

Warning 4   This end tag has no matching start tag. 

是不是我的标签乱序了?我很难过。

最佳答案

你有定义文档类型吗?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

仅作记录,您可以使用 the great W3C validator检查 HTML、XHTML 等的有效性。

关于c# - 此结束标记没有匹配的开始标记。我搞砸了某个地方。请帮我看看好吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7180934/

相关文章:

c# - 如何匹配不同语言的数字?

c# - 在网络用户控件中回发下拉列表所有其他字段变为空

javascript - 我可以在同一个 asp.net 页面中使用外部脚本和我的脚本吗?

ASP.NET:使用基于站点地图的导航有哪些优点?

c# - ASP.NET 控件可见性困境

c# - 如何通过 .asmx Web 服务获取此请求结构?

c# - 是否有可用于跟踪用户事件的框架?

c# - SQL 值超出范围

c# - Winforms:一个COM对象需要一个STAThread,另一个需要一个MTAThread。我该如何使用它们?

c# - Orderby Ascending on a list 错误asp.net