如何检查文件是否已经在AjaxToolkit AsyncFileUpload中上传?

我正在尝试使用Ajaxtoolkit的AsyncUpload上传文件。但是我无法检查文件是否已经上传。如何实现?

我还尝试了if / else块,但它不会触发任何事件。

protected void customFile_UploadedComplete(object sender,AsyncfileUploadEventArgs e)
{
    if (fileUpload.HasFile)
    {
        Array.ForEach(Directory.GetFiles(entity.temppath),File.Delete);

        if (extension == ".zip")
        {
            if (!File.Exists(entity.zippath + fileName))
            {
                fileUpload.PostedFile.SaveAs(entity.zippath + fileName);
            }
            else
            {
                lblerror.Text = "Already uploaded";
            }
        }
    }
}

It goes to else but label text does not show anything.
A19961217 回答:如何检查文件是否已经在AjaxToolkit AsyncFileUpload中上传?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3139122.html

大家都在问