This is often the case when you bind and display data. Some Asp.net Web Database controls, such as repeater and formview, are used in the template, it is also possible that multiple data controls are nested with multiple tables, which can display various complex tables. However, the border line of a table is a problem, we often encounter duplicate edges, which leads to rough edges. How can this problem be solved?
Summary:
<style type="text/css"> body { font-size: 12px; } td { font-size: 12px; height: 20px; line-height: 20px; height:20px; } .table { border-right: black 1px solid; border-bottom: black 1px solid; } .table td { border-top: black 1px solid; border-left: black 1px solid; }</style>
<Asp: formview id = "formview1" runat = "server" datakeynames = "ID" performanceid = "sqlperformance1" width = "100%" font-size = "medium"> <itemtemplate> <Table width = "100%" cellpadding = "0" cellspacing = "0"> <tr> <TD> <Table width = "100%" class = "table" cellpadding = "0" cellspacing = "0"> <tr> <TD align = "center" style = "font-weight: bold; Height: 30px; width: 3% "> Unit </TD> <TD align =" center "colspan =" 5 "style =" width: 97% "> <asp: label id = "lbldw" runat = "server" text = '<% # eval ("unit") %>'> </ASP: label> </TD> </tr> <TD align = "center" style = "font-weight: bold; Height: 30px; width: 10% "> check time </TD> <TD align =" center "colspan =" 2 "> <asp: label id = "lbljcsj" runat = "server" text = '<% # converttime (eval ("check time "). tostring () %> '> </ASP: Label> </TD> <TD align = "center" style = "font-weight: bold; Height: 30px; width: 10% "> check content </TD> <TD align =" center "colspan =" 2 "> <asp: label id = "lbljcnr" runat = "server" text = '<% # eval ("check content") %>'> </ASP: label> </TD> </tr> <TD align = "center" style = "font-weight: bold; Height: 30px; width: 10% "> participants </TD> <TD align =" center "colspan =" 5 "> <asp: label id = "lblcjry" runat = "server" text = '<% # eval ("participant") %>'> </ASP: label> </TD> </tr> <TD align = "center" style = "font-weight: bold; Height: 30px; width: 10% "> hidden danger registration </TD> <TD align =" center "colspan =" 5 "> <asp: label id = "lblyhdj" runat = "server" text = '<% # eval ("Risk registration") %>'> </ASP: label> </TD> </tr> <TD align = "center" style = "font-weight: bold; Height: 30px; width: 3% "> NO. </TD> <TD align =" center "style =" font-weight: bold; Height: 30px; width: 14% "> hidden location </TD> <TD align =" center "style =" font-weight: bold; Height: 30px; width: 34% "> hidden danger content </TD> <TD align =" center "style =" font-weight: bold; Height: 30px; width: 14% "> rectification owner </TD> <TD align =" center "style =" font-weight: bold; Height: 30px; width: 14% "> limited date </TD> <TD align =" center "style =" font-weight: bold; Height: 30px; width: 19% "> completion </TD> </tr> <TD align =" center "id =" one_td1 "runat =" server "> </TD> <TD align = "center" id = "two_td1" runat = "server"> </TD> <TD align = "center" id = "three_td1" runat = "server"> </ TD> <TD align = "center" id = "four_td1" runat = "server"> </TD> <TD align = "center" id = "five_td1" runat = "Server "> </TD> <TD align =" center "id =" six_td1 "runat =" server "> </TD> </tr> <TD align =" center "style =" font-weight: bold; Height: 30px; width: 10% "> remarks </TD> <TD align =" center "colspan =" 5 "> <asp: label id = "lblbz" runat = "server" text = '<% # eval ("Remarks") %>'> </ASP: label> </TD> </tr> <TD align = "center" style = "font-weight: bold; Height: 30px; width: 10% "> organization owner </TD> <TD colspan =" 2 "align =" center "> <asp: label id = "lbldwfzr" runat = "server" text = '<% # eval ("organization owner") %>'> </ASP: label> </TD> <TD align = "center" style = "font-weight: bold; Height: 30px; width: 10% "> record </TD> <TD colspan =" 2 "align =" center "> <asp: label id = "lbljlr" runat = "server" text = '<% # eval ("recorder") %>'> </ASP: label> </TD> </tr> </table> </itemtemplate> <pagerstyle bordercolor = "white"/> <rowstyle bordercolor = "white"/> </ASP: formview>
As follows: