data transfer gird view to excel sheet
<p>data transfer grid view to excel in asp dot net code is run but blank sheet generate of excel but data is not loaded in excel sheeet how to solve this type of broblem</p>

<pre><code>protected void btnexcel_Click1(object sender, EventArgs e)
{

    Response.Clear();
    Response.Buffer = true;
    Response.AddHeader("content-disposition",  
    "attachment;filename=ActualsAndBudgets.xls");
    Response.Charset = "";
    Response.ContentType = "application/ms-excel";
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    StringWriter sw = new StringWriter();
    HtmlTextWriter htw = new HtmlTextWriter(sw);
    gvdetails.AllowPaging = false;
    gvdetails.DataBind();
    gvdetails.RenderControl(htw);
    Response.Write(sw.ToString());
    Response.End();

}
public override void VerifyRenderingInServerForm(Control control)
{

}
</code></pre>
