代码如下:      
        TableCell tc = new TableCell();
        tc.Height = 24;
        tc.Width = Unit.Percentage(100);
        tc.Text = "Testing...";
        Image img = new Image();
        img.ImageUrl = "~/images/edit.gif";
        tc.Controls.Add(img);
        
        TableRow tr = new TableRow();
        tr.Cells.Add(tc);如果像上面那样写的话,运行的时候,表格中只显示Testing...文字,但图像显示不出来,如果不写
 tc.Text = "Testing...";
这一段代码的话,图片才能显示出来,怎么让文本和图像一起显示,急,!帮帮忙!·~

解决方案 »

  1.   

    干脆加个Lable,再给它的Text赋值得了.
      

  2.   

    cell.innerHTML ="<font class='resizeDivClass' onmousedown='MouseDownToResize(this);' onmousemove=MouseMoveToResize(this); onmouseup='MouseUpToResize(this);'></font>"+auth.context.childNodes(0).childNodes(j).nodeName;
    这样写
      

  3.   

    需要使用层,在你设计界面的HTML文档中,或者你的程序中,
    给TableCell加层,底层为背景,外层为文字.
      

  4.   


    tc.Text = "Testing...";
    改为
    tc.InnerText = "Testing...";
      

  5.   

    参考:
    http://xuzq.cnblogs.com/archive/2006/04/25/JsAddRow.html
      

  6.   

    tc.InnerText = "Testing...";好像没有这个属性,
    我想了一个死办法了,把文本和图像放在不同的tc中,可以了!