Send file upload to site on godaddy server
Posted on 2007-10-09
I have a website with an aspx page with c# code behind that I have had running on my own windows server. I have recently transfered the site to a godaddy shared server. I have a page where users can upload photos, the code I have been using to do so is a follows:
This is in the button click event of the .cs file
// Send Upload
UploadConfirmationTextBox.Text = "";
strFileName = FileUpload.PostedFile.FileName;
strFileName = strFileName.Substring(strFileName.LastIndexOf("\\") + 1);
FileUpload.PostedFile.SaveAs("D:\\WebsiteFolder\\Upload\\UploadedPics\\Origionals\\" + PictureNumberString);
UploadConfirmationTextBox.Text = "Uploaded successfully: " + strFileName;
UploadConfirmationTextBox.Text = "Error Uploading " + strFileName;
It worked fine on my own server because the directory was D:.....
How do I change the directory for the shared hosting server?