downloading file
-
User this :
string filename = "x.dat";
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AppendHeader("content-disposition", "attachment; filename=" + filename);
HttpContext.Current.Response.ContentType = "application/exe"; //Change it to your mimetype.
HttpContext.Current.Response.BinaryWrite(filebytes);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.Close();You can use
Response.TransferFile
/ or directlyResponse.Write
based on your content. ;)Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
User this :
string filename = "x.dat";
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AppendHeader("content-disposition", "attachment; filename=" + filename);
HttpContext.Current.Response.ContentType = "application/exe"; //Change it to your mimetype.
HttpContext.Current.Response.BinaryWrite(filebytes);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.Close();You can use
Response.TransferFile
/ or directlyResponse.Write
based on your content. ;)Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using JavascriptThat is correct answer. But you also need to mentioned that he can't download one folder (Which he was asked ). He can Zip and download the file in the way the you have specified. Thanks !
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
That is correct answer. But you also need to mentioned that he can't download one folder (Which he was asked ). He can Zip and download the file in the way the you have specified. Thanks !
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
Yes ... I didnt see that .... :omg: One cant download a folder directly.. . :laugh: :laugh:
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript