Table

Table tb = new Table();
TableRow r = new TableRow();

TableCell c = new TableCell();
c.Text = "Start";
r.Cells.Add(c);

tb.Rows.Add(r);

c.Controls   //声明一个控件实例,然后将其添加到单元格的 Controls 集合。

<table border="0" style="border-style:hidden;" cellspacing="0" cellpadding="5" >
             <%
                 foreach (TableRow tr in tb.Rows)
                 {
                 %>
                  <tr>
                   <%
                       foreach(TableCell ts in tr.Cells)
                       {        
                           %>                      
                            <td ><%=ts.Text%></td> 
                          <%
                        }
                        %>
                   </tr>
               <%
             }
              %>
            </table>

上一篇:Unity 游戏框架搭建 (二) 单例的模板


下一篇:Linux之socket套接字编程20160704