Here is my code from inside Page_Load():<BR><BR>if( Request.QueryString["bExcel"] == "1" )<BR> { <BR> Response.ContentType = "application/";<BR> Response.Charset = ""; <BR> EnableViewState = false; <BR> <BR> System.IO.StringWriter tw = new System.IO.StringWriter();<BR> System.Web.UI.HtmlTextWriter hw= new System.Web.UI.HtmlTextWriter(tw);<BR> <BR> // Get the HTML for the control. <BR> DG.RenderControl(hw); <BR> <BR> // Write the HTML back to the browser. <BR> Response.Write(tw.ToString()); <BR> <BR> Response.Flush();<BR> Response.Close();<BR> } <BR><BR>This works fine with one catch...<BR><BR>I have paging and sorting on my grid set to true. I get an error when I try to export to Excel. The error says &#039;DataGridLinkButton&#039; must be placed inside a form tag. When I set the values to false it works fine.<BR><BR>Any ideas?