here is my coding for Export to Excel :
if (gvIncidentDetail.Rows.Count > 0)
{
Response.Clear();
string filename = "Excel.xls";
Response.AddHeader("content-disposition", "attachment;filename=" + filename);
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
gvIncidentDetail.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
}

i m getting ths error:
Control 'ctl00_centerContentHolder_gvIncidentDetail' of type 'GridView' must be placed inside a form tag with runat=server.

can anyone tell me wht ths error contain?