private void SaveTToWeb()
{
try
{
//create WebClient object
WebClient client = new WebClient();
string myFile = @"C:\Draft_3.txt";
client.Credentials = CredentialCache.DefaultCredentials;
client.UploadFile(@"http://myweb.com/projects/idl/Draft Results/RK/", myFile);
client.Dispose();
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
}
when I run, it doesn't give any error, but when I check the website by refreshing and go previous address, but the file doesn't upload.
can anyone help?
thanks.

New Topic/Question
Reply



MultiQuote




|