save image

Posted by Saravanan05 under ASP.NET on 11/16/2009 | Views : 1230 | Status : [Member] | Replies : 2
hi friends


i am haveing .jpg file in folder..

if user open the browser,i need to fetch some .jpg image and save to another folder..

already i fetched the path of the image...

how can i save the image without user knowledge?




Responses

Posted by: Vuyiswamb on: 11/16/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
use io class to move them. Do you want to Copy or Cut ? This is how you move files in c#

try
{
File.Move(@"C:\Vuyiswa.gif", @"C:\Vuyiswa.gif"); //Move the Files

}
catch (IOException ex)
{
Console.WriteLine(ex);
}


Dont forget to import the io class.

Thank you for posting at Dotnetfunda

Vuyiswa Maseko


Thank you for posting at Dotnetfunda
[Administrator]

Saravanan05, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhijit Jana on: 11/17/2009 [Member] [MVP] Bronze

Up
0
Down
Where are those files are stored ? If they are in server site you can easily move them using File.Move

Cheers !
Abhijit

Saravanan05, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response