This is a migrated thread and some comments may be shown as answers.

Export to Excel code behind

1 Answer 65 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Andrew Short
Top achievements
Rank 1
Andrew Short asked on 30 Oct 2008, 06:18 PM
I would like to add functionality to export certain custom data from an ajaxified page.  On the user clicking a button, the logic would normally look something like:

Response.Clear()
Response.ContentType =
"application/vnd.ms-excel"
Response.AddHeader("Content-Disposition", "attachment; filename="Export.xls")
....
Response.Flush()
Response.Close()

I would like to implement the same functionality with RadAjaxManager, and have Excel open in a new window leaving the original window open and unchanged.  I know I cannot use the Response object in this way with RadAjax.  Is there an alternative to doing this without posting back?

 

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 03 Nov 2008, 11:20 AM
Hello Andrew Short,

I'm afraid that there is not way to achieve such functionality due to the nature of XHttpRequest object.

Greetings,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Andrew Short
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or