Hi,
I have a LinkButton which is embedded in a NestedView of a RadGrid which is Ajax enabled (using an AjaxManagerProxy).
On click on the LinkButton a file should be downloaded. This is the code I use for download:
Response.Clear(); |
Response.AddHeader("Accept-Ranges", "bytes"); |
Response.AddHeader("Connection", "Keep-Alive"); |
Response.AddHeader("Content-Disposition", "attachment; filename=" + doc.FileName); |
Response.AddHeader("Content-Length", doc.FileSize.ToString()); |
Response.ContentType = doc.MimeType; |
Response.BinaryWrite(doc.Content.ToArray()); |
Response.End(); |
This code works perfectly if the grid is not ajax enabled. Is there a way to make it working in an ajax enabled grid?
Many thanks in advance for any suggestions.
Best regards,
Robert