Reputation: 63
Hi Iam generating an image using Response.Write in a web page, I want to save the image generated in a folder, help me doing it please.
Response.Write("<img src='image/Black.gif'>")
Upvotes: 0
Views: 928
Reputation: 3919
`Dim Image As String Image="" For i=0 to 10
Image=Image &""
Next Response.Write(Image) `
An image will be displayed using this code, now the question is I want to save that as a single image in my folder(server side)
use a fileupload control
//Get Filename from fileupload control
string filename = Path.GetFileName(fileuploadimages.PostedFile.FileName);
//Save images into Images folder
fileuploadimages.SaveAs(Server.MapPath("Images/"+filename));
if your image generated is a stream use Image class to convert it
Image.FromStream(yourstream);
to save it without upload control:
Image.Save(Server.MapPath("Images/"+filename"));
`Dim Image As String Image="" For i=0 to 10
Image=Image &""
Next Response.Write(Image) ` An image will be displayed using this code, now the question is I want to save that as a single image in my folder(server side)
Upvotes: 1