<p>I first got an error usign the code below, explaining that "DataGridLinkButton' must be placed inside a form tag with runat=server."</p>

<p>Now I've tried setting AllowSorting to false, as well as removing the sort expression from each column, with the same error.  Then I tried creating a new, plain, DataGrid, with the same data source, but now I get a blank page and FF doesn't recognise the content type properly any more.  Please help.</p>

<pre><code>Response.Clear();
base.Response.Buffer = true;
base.Response.ContentType = "application/vnd.ms-excel";
base.Response.AddHeader("Content-Disposition", "attachment;filename=file.xls");
base.Response.Charset = "";
this.EnableViewState = false;
StringWriter writer = new StringWriter();
HtmlTextWriter writer2 = new HtmlTextWriter(writer);
this.lblExport.RenderControl(writer2);
base.Response.Write(writer.ToString());
</code></pre>

Add the following empty method to your code. That should fix it.
```
```
public override void VerifyRenderingInServerForm(Control control)
    {
    }
```
```