XHTML Traditional table fejl
Hey jeg har en fejl tilbage på min asp.net 2.0 side, som jeg ikke kan lure...Jeg w3c-validere siden via Fire Fox og webtool baren, det er dejligt let... jeg får følgende fejl:
"document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag ."
Kan har to table tags i nedenstående asp.net 2.0 kode og det er det første tags fejlen ref. til...
<AnonymousTemplate>
<br />
<asp:Login ID="Login1" runat="server" DestinationPageUrl="~/Default.aspx" FailureText="Forkert bruger/kode."
Font-Bold="True" Font-Names="Arial" Font-Size="Small" ForeColor="Black" PasswordLabelText="Kode:"
PasswordRequiredErrorMessage="Du skal indtaste kodeord" RememberMeText="Husk mig!"
UserNameLabelText="Bruger:" UserNameRequiredErrorMessage="Du skal indtaste brugernavn"
Width="110px">
<LayoutTemplate>
<table>
<tr>
<td style="width: 112px; height: 137px">
<table border="0" cellpadding="0" style="width: 152px">
<tr>
<td align="left" colspan="2" style="width: 152px; height: 16px;">
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="Small"
Text="Bruger/Kode" Width="131px"></asp:Label></td>
</tr>
<tr>
<td colspan="2" style="width: 152px">
<asp:TextBox ID="UserName" runat="server" ToolTip="Bruger" Width="100px"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
ErrorMessage="Brugernavn" ToolTip="Indtast brugernavn" ValidationGroup="ctl00$ctl12$Login1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td colspan="2" style="width: 152px">
<asp:TextBox ID="Password" runat="server" TextMode="Password" ToolTip="Kodeord" Width="100px">Kode</asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
ErrorMessage="Kodeord" ToolTip="Indtast kodeord" ValidationGroup="ctl00$ctl12$Login1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="False" Font-Names="Arial"
Font-Size="8pt" ForeColor="Black" OnClick="LinkButton1_Click">Glemt login/kode?</asp:LinkButton>
<br />
<br />
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" Font-Names="Arial"
Font-Size="Small" HeaderText="Indtast venligst:" ValidationGroup="ctl00$ctl12$Login1"
Width="152px" />
</td>
</tr>
<tr>
<td colspan="2" style="width: 152px">
<br />
<asp:CheckBox ID="RememberMe" runat="server" Font-Bold="False" Text="Husk mig!" />
</td>
</tr>
<tr>
<td align="left" colspan="2" style="width: 152px; color: white">
</td>
</tr>
<tr>
<td align="left" style="width: 152px">
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="ctl00$ctl12$Login1" />
<asp:Button ID="ButtonNewAccount" runat="server" OnClick="Button1_Click" Text="Registrer" /><br />
<br />
</td>
</tr>
</td>
</tr>
</table>
</LayoutTemplate>
</asp:Login></table>
</AnonymousTemplate>
Fire fox kildekode ser således ud:
Læg mærke til, at det table tags jeg selv har skrevet i asp.net koden, er det anden øverste nu...den indsætter åbenbart selv login konponentet i et table tag...
# <table id="ctl00_LoginView1_Login1" cellspacing="0" cellpadding="0" border="0" width="110">
# <tr>
# <td><font face="Arial" color="Black" size="3"><b>
# <table >
# <tr>
# <td style="width: 112px; height: 137px">
# <table border="0" cellpadding="0" style="width: 152px">
# <tr>
# <td align="left" colspan="2" style="width: 152px; height: 16px;">
# <span id="ctl00_LoginView1_Login1_Label1" style="display:inline-block;"><b><font face="Arial" size="3">Bruger/Kode</font></b></span></td>
# </tr>
# <tr>
# <td colspan="2" style="width: 152px">
# <input name="ctl00$LoginView1$Login1$UserName" type="text" id="ctl00_LoginView1_Login1_UserName" title="Bruger" />
#
# </td>
# </tr>
# <tr>
# <td colspan="2" style="width: 152px">
# <input name="ctl00$LoginView1$Login1$Password" type="password" id="ctl00_LoginView1_Login1_Password" title="Kodeord" />
#
# </td>
# </tr>
# <tr>
# <td>
# <a id="ctl00_LoginView1_Login1_LinkButton1" href="java script:__doPostBack('ctl00$LoginView1$Login1$LinkButton1','')"><font face="Arial" color="Black" size="1">Glemt login/kode?</font></a>
# <br />
# <br />
#
# </td>
# </tr>
# <tr>
# <td>
#
# </td>
# </tr>
# <tr>
# <td colspan="2" style="width: 152px">
# <br />
# <span><input id="ctl00_LoginView1_Login1_RememberMe" type="checkbox" name="ctl00$LoginView1$Login1$RememberMe" /><label for="ctl00_LoginView1_Login1_RememberMe">Husk mig!</label></span>
# </td>
# </tr>
# <tr>
# <td align="left" colspan="2" style="width: 152px; color: white">
# </td>
# </tr>
# <tr>
# <td align="left" style="width: 152px">
# <input type="submit" name="ctl00$LoginView1$Login1$LoginButton" value="Log In" onclick="java script:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$LoginView1$Login1$LoginButton", "", true, "ctl00$ctl12$Login1", "", false, false))" id="ctl00_LoginView1_Login1_LoginButton" />
# <input type="submit" name="ctl00$LoginView1$Login1$ButtonNewAccount" value="Registrer" id="ctl00_LoginView1_Login1_ButtonNewAccount" /><br />
# <br />
# </td>
# </tr>
# </table>
# </td>
# </tr>
# </table>
# </b></font></td>
# </tr>
# </table>
Jegh håber meget I kan hjælpe mig...
Mvh. PabloPablo