Response.Clear(); Response.ContentType = "application/vnd.xls"; Response.AddHeader("content-disposition", "attachment;filename=subscribers.xls"); StringWriter swriter = new StringWriter(); HtmlTextWriter hwriter = new HtmlTextWriter(swriter); HtmlForm frm = new HtmlForm(); this.gvViewSearch.Parent.Controls.Add(frm); frm.Attributes["runat"] = "server"; frm.Controls.Add(this.gvViewSearch); frm.RenderControl(hwriter); Response.Write(swriter.ToString()); Response.End();
public override void VerifyRenderingInServerForm(Control control) { }
//public override void VerifyRenderingInServerForm(Control control) //{ //}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)