The code below can't run under Ajax, could you modify it for me? Thanks!
public static void SaveFile(string FileName, byte[] ss)
{
long fileSize = ss.LongLength;
if (fileSize >= 1)
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ContentType = "application/octet-stream";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=\"" + FileName + "\"");
HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
HttpContext.Current.Response.BinaryWrite(ss);
HttpContext.Current.Response.End();
}
}