本文介绍了Asyncfileupload上传文件并将路径保存到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
上传文件时出现问题,
触发 UploadedComplete 操作后,
保存到上传路径中的文件,
但是当另一个按钮触发时
方法if (fuImage.HasFile)
返回null
注意:更新面板中的代码
I''ve a problem when uploading file,
After UploadedComplete action fired,
the file saved into the Upload path,
but when another button fired
the method if (fuImage.HasFile)
return null
Note : the code into Update Panel
推荐答案
if (fileUploadCategoryImage.HasFile == true)
{
string ImagePath= UploadImage(fileUploadCategoryImage);
// use that ImagePath and store it into the DataBase
}
public string UploadImage(FileUpload fileUpload1)
{
// upload file in the folder
return strImageFile
}
这篇关于Asyncfileupload上传文件并将路径保存到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!