Hello all
I have http handler which is making download for list of files , but when I call this handler from mt web page and pass list of objects contains the file to be downloaded , It just allow to download the first file in the list but with the second file in list I get the following error "Server cannot append header after HTTP headers have been send" my code is as the following :
foreach(fileobject obj in lstfiles)
{
context.Response.AddHeader("Content-Disposition", "attachment; filename=" + obj.Filename));
context.Response.AddHeader("Content-Length", obj.Length.ToString());
context.Response.ContentType = "application/octet-stream";
context.Response.WriteFile(obj.CompleteFilename);
context.Response.Flush();
context.Response.Close();
}
please if any body get what I mean and can help me in solving this issue please send me or tell me about some URL may help me in solving it
regards
Mostafa