Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Export to Excel from GV on a panel (modal popup extender)

Reply
Thread Tools

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

 
 
jonefer
Guest
Posts: n/a
 
      05-16-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export to Excel (Default File Type - Excel) =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?= ASP .Net 15 05-21-2009 12:01 PM
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
Export to excel in asp.net using excel template Grey ASP .Net 4 10-17-2007 08:08 AM
using Microsoft Excel image for Export to Excel button =?Utf-8?B?U3JpZGhhcg==?= ASP .Net 0 12-09-2005 08:58 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM



Advertisments