简体   繁体   English

如何获得 asp.net 控件以生成符合 W3c 的 html?

[英]How can I get asp.net controls to generate W3c compliant html?

I recently ran some of my ASP pages through "HTML Tidy" validation and found that several warnings were generated due to HTML tags not being properly formed ie extra closing tags.On investigation it seems that the ASP Menu control which i am using as the left navigation bar is generating this invalid HTML.我最近通过“HTML Tidy”验证运行了我的一些 ASP 页面,发现由于 HTML 标记没有正确形成,即额外的结束标记,生成了几个警告。经过调查,似乎我使用的 ASP 菜单控件作为左侧导航栏正在生成这个无效的 HTML。 It seems that the HTML for this control which Microsoft's automatically generates just isn't HTML compliant.微软自动生成的该控件的 HTML 似乎不符合 HTML。

Has anyone else experienced this?有没有其他人经历过这个?

Does anyone know if there is any way of fixing this?有谁知道是否有任何方法可以解决这个问题?

See Warnings below请参阅下面的警告

line 175 column 41 - Warning: discarding unexpected </a>
line 175 column 45 - Warning: discarding unexpected </td>
line 176 column 4 - Warning: discarding unexpected </tr>
line 181 column 48 - Warning: missing </a> before <tr>
line 192 column 41 - Warning: discarding unexpected </a>
line 192 column 45 - Warning: discarding unexpected </td>
line 193 column 4 - Warning: discarding unexpected </tr>
line 198 column 48 - Warning: missing </a> before <tr>
line 209 column 41 - Warning: discarding unexpected </a>
line 209 column 45 - Warning: discarding unexpected </td>
line 210 column 4 - Warning: discarding unexpected </tr>
line 215 column 48 - Warning: missing </a> before <tr>
line 226 column 41 - Warning: discarding unexpected </a>
line 226 column 45 - Warning: discarding unexpected </td>
line 227 column 4 - Warning: discarding unexpected </tr>
line 232 column 48 - Warning: missing </a> before <tr>
line 243 column 41 - Warning: discarding unexpected </a>
line 243 column 45 - Warning: discarding unexpected </td>
line 244 column 4 - Warning: discarding unexpected </tr>
line 249 column 48 - Warning: missing </a> before <tr>
line 260 column 41 - Warning: discarding unexpected </a>
line 260 column 45 - Warning: discarding unexpected </td>
line 261 column 4 - Warning: discarding unexpected </tr>
line 266 column 48 - Warning: missing </a> before <tr>
line 277 column 41 - Warning: discarding unexpected </a>
line 277 column 45 - Warning: discarding unexpected </td>
line 278 column 4 - Warning: discarding unexpected </tr>
line 283 column 48 - Warning: missing </a> before <tr>
line 294 column 41 - Warning: discarding unexpected </a>
line 294 column 45 - Warning: discarding unexpected </td>
line 295 column 4 - Warning: discarding unexpected </tr>
line 306 column 9 - Warning: missing </span> before <table>

You may want to look at this project: http://www.asp.net/CssAdapters/你可能想看看这个项目: http://www.asp.net/CssAdapters/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM