السلام عليكم ورحمته وبركاته
اخوتي الكرام امامكم كود لعمل داونلوود لصوره من على الصفحه اريد ان اعرف كيف يتم تحويل الصوره الى pdf
protected void DownloadBTN_Click(object sender, EventArgs e)
{
string filename = "Winter.jpg";
// set the http content type to "APPLICATION/OCTET-STREAM
Response.ContentType = "APPLICATION/OCTET-STREAM";
// initialize the http content-disposition header to
// indicate a file attachment with the default filename
// "Access.mdb"
string disHeader = "Attachment; Filename=\"" + filename + "\"";
Response.AppendHeader("Content-Disposition", disHeader);
// transfer the file byte-by-byte to the response object
FileInfo fileToDownload = new FileInfo("~/Picture/Winter.jpg");
Response.Flush();
Response.WriteFile(fileToDownload.FullName);
}
الكود مظبوت مره اخره
protected void DownloadBTN_Click(object sender, EventArgs e)
{
string filename = "Winter.pdf";
// set the http content type to "APPLICATION/OCTET-STREAM
Response.ContentType = "APPLICATION/OCTET-STREAM";
// initialize the http content-disposition header to
// indicate a file attachment with the default filename
// "Access.mdb"
string disHeader = "Attachment; Filename=\"" + filename + "\"";
Response.AppendHeader("Content-Disposition", disHeader);
// transfer the file byte-by-byte to the response object
FileInfo fileToDownload = new FileInfo("~/Picture/Winter.jpg");
Response.Flush();
Response.WriteFile(fileToDownload.FullName);
}


