Hi,
I thing you should first copy the file you upload into server
upload location.
Let say that in your application root assembly you have a sub directory
\UploadFiles.
Example code:
protected void Button1_Click(object sender, EventArgs e)
{
if (this.FileUpload1.HasFile)
{
this.FileUpload1.SaveAs(Server.MapPath("~/UploadFiles/" +
this.FileUpload1.FileName.ToString()));
string uploadedFile = (Server.MapPath("~/UploadFiles/" +
this.FileUpload1.FileName.ToString()));
}
}
Then the file you've uploaded will be copy into your
\UploadFiles directory.
See value of
uploadedFile variable in above sample:
C:\Testing\UploadFiles\mcts.JPG
Otherwise if you do not copy this into you map server
after publishing your application you will encounter
an error.
Hope this could help.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Regards,
Algem