this.GridView1.RenderControl(oHtmlTextWriter); //this.RenderControl(oHtmlTextWriter); //this 表示输出本页,你也可以绑定datagrid,或其他支持obj.RenderControl()属性的控件 Response.Write(oStringWriter.ToString()); Response.End(); } publicoverridevoid VerifyRenderingInServerForm(Control control) { // Confirms that an HtmlForm control is rendered for }