HtmlGenericControl hgc = new HtmlGenericControl("DIV");HtmlTable table1=new HtmlTable ();
...
hgc.Controls.Add(table1);Page.Controls.Add (hgc);

解决方案 »

  1.   

    很感谢你的帮助,我按你说的做成了,但我还有个问题想请教还请你给予帮助
     cell.InnerHtml ="<a href='http://www.microsoft.com/china/index.htm' src='key.bmp' width='14' height='14' /> aaaaaaaa"
    这行代码的目的是想在单元格中写入链接地址'http://www.microsoft.com/china/index.htm图标src='key.bmp' width='14' height='14' 和文字aaaaaaaa,但是我上面的代码是错误码的请帮忙写个正确的多谢了
      

  2.   

    cell.InnerHtml ="<a href='http://www.microsoft.com/china/index.htm'><img  src='key.bmp' width='14' height='14' alt='aaaaaaaa'></a>"or
    HyperLink hl = new HyperLink();
    hl.NavigateUrl = "http://www.microsoft.com/china/index.htm";
    hl.ImageUrl = "key.bmp";
    hl.ToolTip = "aaaaaaaa";
    hl.Width = Unix.Pixel(14);
    hl.Height = Unit.Pixel(14);
    cell.Controls.Add(hl);
      

  3.   

    saucer(思归, .NET MVP) 
      非常感谢!!!
    还请日后多多指教