Note that there are some explanatory texts on larger screens.

plurals
  1. POsave multiple image to local from folder in asp.net
    primarykey
    data
    text
    <p>ive got a file download issue can you help me for that...</p> <p>here is the code:</p> <pre><code> DirectoryInfo directoryInfo = new DirectoryInfo(Server.MapPath(@"/Bailiffs/BailiffFiles/")); string cukurNumber = string.Empty; if (txtCukurNumber.Text != string.Empty) { cukurNumber = txtCukurNumber.Text; } FileInfo[] fileInfoEnum = directoryInfo.GetFiles(cukurNumber + "*"); Response.Clear(); Response.AddHeader("Content-Disposition", "attachment;filename=" + txtCukurNumber.Text + ".zip"); Response.ContentType = "application/zip"; using (ZipOutputStream zipStream = new ZipOutputStream(Response.OutputStream)) { zipStream.SetLevel(9); byte[] zipBuffer = new byte[4096]; foreach (FileInfo fileInfo in fileInfoEnum) { string fileFullName = fileInfo.FullName; ZipEntry zipEntry = new ZipEntry(Path.GetFileName(fileFullName)); zipEntry.DateTime = DateTime.Now; zipStream.PutNextEntry(zipEntry); using (FileStream fileStream = File.OpenRead(fileFullName)) { int sourceBytes = 0; do { sourceBytes = fileStream.Read(zipBuffer, 0, zipBuffer.Length); zipStream.Write(zipBuffer, 0, sourceBytes); } while (sourceBytes &gt; 0); } } zipStream.Finish(); zipStream.Close(); Response.Flush(); Response.End(); } </code></pre> <p>this code must be get all image files by filter and save to disk but save file dialog of browser is opening just one time and one bizarre file is saving... where am i doing wrong...</p> <p>thanks..</p> <p>Edit : Bizzarre file issue is solved now the main issue is single file saving instead of multiple.. thanks again...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload