I'm trying to add the ability to download a file by clicking on a link that is in a RadGrid within a RadAjaxPanel. I'm using Response but realize that doesn't work with Ajaxified pages. Are there any workarounds for this snippet of code?
if (dlFile.Exists)
{
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=" + dlFile.Name);
Response.AddHeader(
"Content-Length", dlFile.Length.ToString());
Response.ContentType = ReturnExtension(dlFile.Extension.ToLower());
Response.TransmitFile(dlFile.FullName);
Response.End();
}
Thanks