这个同样的问题,2帖子一起给分
http://community.csdn.net/Expert/topic/5415/5415247.xml?temp=.0381586<asp:Panel ID="Panel1" runat="server" Height="100%" Width="100%">
            <table>
                <tr>
                    <td>
            <asp:LabelID="Label1"runat="server"Text="Label"></asp:Label>
                    </td>
                </tr>
            </table>
</asp:Panel> 这段。StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
Panel1.RenderControl(hw);后面怎么把label1写出来?谢谢大家