<table runat="server"> 元素要在增加行TR的TD中内嵌
2008-08-27 14:38
507 查看
<table runat="server" style="width: 800px; font-size:12px; border-collapse:collapse; border:solid 1px #000000; " border="1" id="tblOneyDay" >$g%W+?.^:P.R
<tr> j([$@*c#t/r7K'|
<td style="font-weight: bold; background-color: #ccc; text-align: center; vertical-align: top; height: 17px; width: 61px;">
</td>
<td style="font-weight: bold; background-color: #ccc; text-align: center; vertical-align: top; height: 17px;">
</td>tech.techweb.com.cn-R(d1f+g#u
</tr>%_+j"V$`5c*a ?8p
<asp:Repeater ID="rptOneDay" runat="server">
<ItemTemplate>TechWeb-技术社区"o;r S8m7V%y;P8F
<tr>程序开发,操作系统,服务器,源码下载,Linux,Unix,BSD,PHP,Apach,asp,下载,源码,黑客,安全,技术社区,技术论坛6@,`/[9a4C/|'j2h
<td style="font-weight: bold; background-color: #ccc; text-align: center; vertical-align: top; height: 17px; width: 61px;"><%# DataBinder.Equals(Container.DataItem, "DISPLAYHOUR")%>
</td>
<td style="font-weight: bold; background-color: #ccc; text-align: center; vertical-align: top; height: 17px;"><%# DataBinder.Equals(Container.DataItem, "MEETINGCONTENT_1")%>2]9K M!Y!V!Q
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
提示出错,编译不过去,
出错原因: TechWeb-技术社区!G2I+s&b-O6U-a.D7|
Error 1 The best overloaded method match for 'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)' has some invalid arguments D:\projects\oneday.aspx 15
去掉runat="server"是客户端html,在服务器中不会编译,即使出现我说的上述元素必须在TD中,但是没有在服务器端编译,所以不会在服务端显式提示.
相反,你添加了,服务端生成HTML过程中会发现我所说的上述错误.
'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)'
用了runat=server,就是服务器控件了,再生成HTML过程中,就发现错误了,显然是再增加行时出现了错误...,也就是元素不在增加行TR的TD中内嵌.
<tr> j([$@*c#t/r7K'|
<td style="font-weight: bold; background-color: #ccc; text-align: center; vertical-align: top; height: 17px; width: 61px;">
</td>
<td style="font-weight: bold; background-color: #ccc; text-align: center; vertical-align: top; height: 17px;">
</td>tech.techweb.com.cn-R(d1f+g#u
</tr>%_+j"V$`5c*a ?8p
<asp:Repeater ID="rptOneDay" runat="server">
<ItemTemplate>TechWeb-技术社区"o;r S8m7V%y;P8F
<tr>程序开发,操作系统,服务器,源码下载,Linux,Unix,BSD,PHP,Apach,asp,下载,源码,黑客,安全,技术社区,技术论坛6@,`/[9a4C/|'j2h
<td style="font-weight: bold; background-color: #ccc; text-align: center; vertical-align: top; height: 17px; width: 61px;"><%# DataBinder.Equals(Container.DataItem, "DISPLAYHOUR")%>
</td>
<td style="font-weight: bold; background-color: #ccc; text-align: center; vertical-align: top; height: 17px;"><%# DataBinder.Equals(Container.DataItem, "MEETINGCONTENT_1")%>2]9K M!Y!V!Q
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
提示出错,编译不过去,
出错原因: TechWeb-技术社区!G2I+s&b-O6U-a.D7|
Error 1 The best overloaded method match for 'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)' has some invalid arguments D:\projects\oneday.aspx 15
去掉runat="server"是客户端html,在服务器中不会编译,即使出现我说的上述元素必须在TD中,但是没有在服务器端编译,所以不会在服务端显式提示.
相反,你添加了,服务端生成HTML过程中会发现我所说的上述错误.
'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)'
用了runat=server,就是服务器控件了,再生成HTML过程中,就发现错误了,显然是再增加行时出现了错误...,也就是元素不在增加行TR的TD中内嵌.
相关文章推荐
- <html>table、tr/td、thead、tbody、tfoot、col、colgroup
- html<table><th><tr><td><caption><thead><tbody><tfoot>属性总结
- 网页源代码中的"<tr>"、"<td>"、"</tr>"和"</td>"各是什么意思?
- 问题:C#后台获取tr;结果:C# <tr id="a" runat="server"> 怎么在后台用FindControl找到这个tr的id?
- 返回结果自动在标签外添加<tr><td class="tdlabel">........</td></tr>
- struts2的form等表单布局问题,去掉其自动生成的<table><tr><td>标签
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+pat----------<base>元素有关
- Parse Fatal Error at line 41 column 24: 元素类型 "url-pattern" 必须由匹配的结束标记 "</url-pattern>" 终止
- Parse Fatal Error at line 41 column 24: 元素类型 "url-pattern" 必须由匹配的结束标记 "</url-pattern>" 终止
- 开发日志:struts标签[<s:selec>/<s:submit>/<s:form>......] 在table的时候位置错误 [会自动换行/自动生成tr、td的问题]
- HTTP 错误 500.19 - Internal Server Error | <compilation targetFramework="4.0">
- Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml
- 【OpenCV3图像处理】Mat中元素的获取与赋值 ( 对比.at<>()函数 和 .ptr<>()函数)
- Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xm
- js实现根据<td>中的文本值确定是否输出该行<tr>
- C# runat="server"
- <table>合并单元格&图片铺满整个<td>
- document.getElementById("xxx") 获取table中td的元素,length = 0 但,console打印出有元素--bootstraptable动态table
- Docker 数据卷查看 映射的目录出错(Template parsing error: template: :1:2: executing "" at <.Volumes>: map has no)
- Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml