I want to upload a file using FileUpload Control in asp.net and i'm using the following code to do that:
string filename1 = System.IO.Path.GetFileName(FileUploadControl.FileName);
FileUploadControl.SaveAs("C:\\Users\\admin\\Desktop\\ExperimentForFolder\\" + filename1);
i also tried
FileUploadControl.SaveAs(@"C:\Users\admin\Desktop\ExperimentForFolder\" + filename1);
But it is still freaking out. I don't understand what is wrong. Can you please help me.
Thanks in anticipation