how to download file using c sharp

Posted by Sahoo under ASP.NET AJAX on 1/4/2012 | Points: 10 | Views : 1713 | Status : [Member] | Replies : 4
hi,

Can any body me complete code to download a file using asp.net. my SERVICE RETURNING 200 OK MESSAGE




Responses

Posted by: Sahoo on: 1/4/2012 [Member] Starter | Points: 25

Up
0
Down
here is what i het in header


i got 200 ok message not the download box


urget help needed.
 Download source file

Sahoo, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sahoo on: 1/4/2012 [Member] Starter | Points: 25

Up
0
Down
//String FileName = "Koala.jpg";
//String FilePath = @"uuu\Koala.jpg";
//System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
//response.ClearContent();
//response.Clear();
//response.ContentType = "Application/octet-stream";
//response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
//response.TransmitFile(FilePath);
//response.Flush();
//response.End();


my is like this

Sahoo, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sahoo on: 1/5/2012 [Member] Starter | Points: 25

Up
0
Down
Please see the attachment of header and guide me.

I know it is challenging .

Sahoo, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response