B
Brian Pittman
Hi,
When uploading a file it tells me that the HasFile property is false
even though a file has been selected through the FileUpload control.
What is even stranger is it uploads the file to root of the web folder
and created a zero byte file with the file name in the directory specified.
Below is the code I used to upload the file.
if (file.HasFile)
{
file.SaveAs(Server.MapPath("\\files\\") + file.FileName);
}
Basic code, but should work none the less. I have created many apps
that required uploading, this is the first time I have encountered this
problem. Though I have just switched to VS 2008 and Vista Ultimate.
Perhaps one of these could be the problem?
Regards,
Brian
When uploading a file it tells me that the HasFile property is false
even though a file has been selected through the FileUpload control.
What is even stranger is it uploads the file to root of the web folder
and created a zero byte file with the file name in the directory specified.
Below is the code I used to upload the file.
if (file.HasFile)
{
file.SaveAs(Server.MapPath("\\files\\") + file.FileName);
}
Basic code, but should work none the less. I have created many apps
that required uploading, this is the first time I have encountered this
problem. Though I have just switched to VS 2008 and Vista Ultimate.
Perhaps one of these could be the problem?
Regards,
Brian