Author: maroo.jay | Posted on: 12/21/2009 7:25:41 AM | Views : 1265

Hello,
I have two queries- 
a) Is there any other way to get Save dialog box in web application to save any file or image.
I used below code to save image at local machine.
------
filePath = System.IO.Path.GetFullPath(Server.MapPath("") + "\\" + @"Image\Cheque_Front.JPG");
System.IO.FileInfo targetFile = new System.IO.FileInfo(filePath);

try
{
objFileInfo = new FileInfo(filePath);
Response.Clear();
Response.Cache.SetCacheability(System.Web.HttpCacheability.Private);
Response.AddHeader("Content-Disposition", ("attachment; filename=" + objFileInfo.Name));
Response.AddHeader("Content-Length", objFileInfo.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(filePath);
Response.End();
}
catch (Exception ex)
{

}
b) I have two images and one save ...

Go to the complete details ...