[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.buildingcontrols

Export to Excel from GV on a panel (modal popup extender

jonefer

5/16/2008 2:04:00 AM

If I want to export an Excel from a gridview
I normally use these two procedures... but I get a render error perhaps due
to the fact that this particular gridview is on a panel triggered by a modal
popup extender:

What should I modify or add?

'this line is to help the Export to Excel control
Public Overloads Overrides Sub VerifyRenderingInServerForm(ByVal control As
Control)
End Sub


Protected Sub cmdExcelExport_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdExcelExport.Click
Response.Clear()
Response.AddHeader("content-disposition",
"attachment;filename=FileName.xls")
Response.Charset = ""
Response.ContentType = "application/vnd.xls"
Dim stringWrite As System.IO.StringWriter = New System.IO.StringWriter
Dim htmlWrite As System.Web.UI.HtmlTextWriter = New
HtmlTextWriter(stringWrite)
gvActionList.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString)
Response.End()

End Sub