Streaming file from ajaxified button

4 posts, 0 answers
  1. Gene
    Gene avatar
    64 posts
    Member since:
    Dec 2007

    Posted 02 Mar 2011 Link to this post

    Is there a way to stream a file to the response object using an ajaxified button?
  2. Daniel
    Admin
    Daniel avatar
    4946 posts

    Posted 08 Mar 2011 Link to this post

    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!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Neil N
    Neil N avatar
    75 posts
    Member since:
    Aug 2012

    Posted 12 Apr 2013 Link to this post

    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
  5. Daniel
    Admin
    Daniel avatar
    4946 posts

    Posted 17 Apr 2013 Link to this post

    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.
Back to Top