csharp Asynch文件上传器

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp Asynch文件上传器相关的知识,希望对你有一定的参考价值。

<!--In your markup -->
  <ajaxToolkit:AsyncFileUpload runat="server" ID="fuLogoUploader" OnUploadedComplete="AsyncUpload_UploadedComplete" />
  
  // In your code behind
  
    protected void AsyncUpload_UploadedComplete(object sender, EventArgs e)
    {
        var fileLocation =
            FileHelper.GetFullFilePhysicalPath(SettingsKeyInfoProvider.GetValue(
                "LogoUploadLocation",
                SiteContext.CurrentSiteName),
                null);

        var fileUploadEventArgs = e as AsyncFileUploadEventArgs;
        var fileUploader = sender as AsyncFileUpload;

        if (fileUploader.HasFile)
            SaveImageToDisk(fileUploader, fileLocation, fileUploadEventArgs);
    }

以上是关于csharp Asynch文件上传器的主要内容,如果未能解决你的问题,请参考以下文章

csharp 上传文件#CSharp

csharp文件分片上传,断点续传

csharp 上传的文件限制(IIS Express)

csharp 上传文件和检查大小和类型

csharp C#多部分文件上传

csharp 上传文件web api 2