English 中文(简体)
审定(XVD 1.0 过渡): 不能在要素四内加固......
原标题:Validation (XHTML 1.0 Transitional): Element html cannot be nested within element div
  • 时间:2012-05-07 22:25:18
  •  标签:
  • c#
  • asp.net

我需要帮助确定我守则中的错误。 当我编纂该法典时,我对错误的验证(X/60/81.0 过渡): 不能在要素四内加固......。 如果有人知道,请帮助我?

 <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ManageUsers.aspx.cs" Inherits="probazaadmin.ManageUsers" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form2" runat="server"></form>
    <div>Users Account Management</div>
    <p></p>
    <b>- The total registered users is: <asp:Literal runat="server" ID="lblTotalUsers" /><br />
    - The total online users at this moment: <asp:Literal runat="server" ID="lblOnlineUsers" /></b>
    <p></p>
    In order to display all users whose name begins with letter click on the link letter:
    <p></p>

    <asp:Repeater runat="server" ID="rptAlphabetBar"
    OnItemCommand="rptAlphabetBar_ItemCommand">
    <ItemTemplate><asp:LinkButton ID="LinkButton1" runat="server" Text= <%# Container.DataItem %> 
    CommandArgument= <%# Container.DataItem %>  />&nbsp;&nbsp;
    </ItemTemplate>
    </asp:Repeater>
    <p></p>
    Use the below feature to search users by partial username or e-mail:
    <p></p>

    <asp:DropDownList runat="server" ID="ddlUserSearchTypes">
    <asp:ListItem Text="UserName" Selected="true" />
    <asp:ListItem Text="E-mail" />
    </asp:DropDownList>
    contains
    <asp:TextBox runat="server" ID="txtSearchText" />
    <asp:Button runat="server" ID="btnSearch" Text="Search"
    OnClick="btnSearch_Click" />
    </body></html>
    </asp:Content>
最佳回答

你的法典显示:

    <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master"....
  1. 使用总页(即超文本声明的所在地)

    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
  2. using the content page placeholder to add and entire HTML document - which you shouldn t do.

    • as stated, the master page is where HTML declarations go
    • ASP.net content sections are for content only.
问题回答

Your code should be like this <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ManageUsers.aspx.cs" Inherits="probazaadmin.ManageUsers" %> Users Account Management

- The total registered users is:
- The total online users at this moment:

In order to display all users whose name begins with letter click on the link letter:

<asp:Repeater runat="server" ID="rptAlphabetBar"
OnItemCommand="rptAlphabetBar_ItemCommand">
<ItemTemplate><asp:LinkButton ID="LinkButton1" runat="server" Text= <%# Container.DataItem %> 
CommandArgument= <%# Container.DataItem %>  />&nbsp;&nbsp;
</ItemTemplate>
</asp:Repeater>
<p></p>
Use the below feature to search users by partial username or e-mail:
<p></p>

<asp:DropDownList runat="server" ID="ddlUserSearchTypes">
<asp:ListItem Text="UserName" Selected="true" />
<asp:ListItem Text="E-mail" />
</asp:DropDownList>
contains
<asp:TextBox runat="server" ID="txtSearchText" />
<asp:Button runat="server" ID="btnSearch" Text="Search"
OnClick="btnSearch_Click" />
</asp:Content>




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签