Asyncfileupload上传文件并将路径保存到数据库 [英] Asyncfileupload Upload File and Save Path into DataBase

查看:61
本文介绍了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

推荐答案

我不确定,但是请尝试这样做,希望对您有所帮助
I am not sure but try this hope it will be helpful
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上传文件并将路径保存到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆