i have this code
it keeps giving me error 

```
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click

    Dim response As HttpResponse = HttpContext.Current.Response()
    response.Clear()
    response.AddHeader("content-disposition", "attachment;filename=XXXXXX.xls")
    response.ContentType = "application/vnd.ms-excel"
    Dim s As System.IO.StringWriter = New System.IO.StringWriter
    Dim htw As HtmlTextWriter = New HtmlTextWriter(s)
    GridView1.RenderControl(htw)
    response.Write(s.ToString)
    response.End()
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As System.Web.UI.Control)

End Sub

```

the error is after i click on export : RegisterForEventValidation can only be called during 

```
Render(); 

```

and it highlight this script 

```
 GridView1.RenderControl(htw)

```

any advices