原码:
            Dim tab1 As New Table
            tab1.CssClass = "tableunderline"
            tab1.Width = Unit.Percentage(98)
            tab1.BorderWidth = Unit.Pixel(0)
            tab1.CellPadding = 3
            tab1.CellSpacing = 0编译运行后的结果是:
<table class="tableunderline" cellspacing="0" cellpadding="3" border="0" style="border-width:0px;width:98%;border-collapse:collapse;">我中想要:
<table class="tableunderline" cellspacing="0" cellpadding="3" border="0">把项目设成:Flow 还是一样!
无缘无故跑出好多 style我在最后还加了一名 tab1.Style.Clear()
还是和原来一样,我应该怎么做?
详细点谢谢!

解决方案 »

  1.   

    并且她还会自动加上  border="0" ,即使你设置attribute("border") = "1" 也没用.大力up!
      

  2.   

    这样写.net肯定会替你指定位置等一些基本参数,建议你这么来写
    前面声明一个<table><tr><td id="tab1" ruuat="server"></td></tr></table>
    然后用td.IneerText += ....
    来添加你要的那个tabel就没问题了。
      

  3.   

    可是我 table 里有很多对象了!
      

  4.   

    而且还要添加到另的TD里面,所以一定要用 table
      

  5.   

    tab1.Attributes.Add("style","");
    怎么想出来的?
    可惜还是不行,谢谢,请各位继续!
      

  6.   

    table.Attributes.Add("style","里面是你要加的样式啊");
    可以的...
      

  7.   

    table.Attributes.Add("style","里面是你要加的样式啊");
    可以的...
    -----------------------------
    这样当然可以了!但是自动生成的:style="border-width:0px;width:98%;border-collapse:collapse;"
    还在里面,影响了我风格的表现!
      

  8.   

    table.Attributes.Clear();
    先加上这个行不?
      

  9.   

    并且她还会自动加上  border="0" ,即使你加上table.Attributes.Clear();
    设置attribute("border") = "1" 也没用....
    这个问题哪个能解决???狂up.