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

Streaming file from ajaxified button

3 Answers 30 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Gene
Top achievements
Rank 1
Gene asked on 02 Mar 2011, 11:40 PM
Is there a way to stream a file to the response object using an ajaxified button?

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 08 Mar 2011, 12:51 PM
Hello Gene,

Unfortunately this is not possible. Please examine the following help topic:
Download files with ajaxified control

Best regards,
Daniel
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Neil N
Top achievements
Rank 1
Veteran
Iron
answered on 12 Apr 2013, 04:09 PM
Is this still the case?  So the code below will not work if called from an Ajaxified button?

Using OutStream As New MemoryStream
    xls.Save(OutStream)
    OutStream.Position = 0
    Response.Clear()
    Response.AddHeader("Content-Disposition", "attachment; filename=Submissions_Detail.xls")
    Response.AddHeader("Content-Length", OutStream.Length.ToString())
    Response.ContentType = "application/excel" 'octet-stream";
    Response.BinaryWrite(OutStream.ToArray())
    Response.End()
End Using
0
Daniel
Telerik team
answered on 17 Apr 2013, 12:02 PM
Hello Neil,

This is not a limitation in our control but rather a limitation of the ASP.NET AJAX. You can find a possible workaround here:
AJAX, file downloads, and IFRAMEs

Best regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
Gene
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Neil N
Top achievements
Rank 1
Veteran
Iron
Share this question
or