我想上传一个图像到文件,但有一个例外,如“SaveAs方法配置为需要一个根路径,并且路径'../TempCharcoal/IMG_0153.JPG'是没有扎根。“FileUpload不会上传文件
这里是我的简单的代码:
if (fuImage.HasFile)
{
fuImage.SaveAs("../TempCharcoal/IMG_0153.JPG");
}
我要上传它CharcoalForm.aspx到TempCharcoal文件夹。你可以看到他们在同一个根,但我不知道什么是错的。
可能的重复:http://stackoverflow.com/questions/1206662/the-saveas-method-is-configured-to-require-a-rooted-path-and-the-path-fp-is-n –
@SteveDanner它不是重复的,但可能有用 – SShaheen