内ListView控件的EditItemTemplate的AsyncFileUpload [英] AsyncFileUpload within EditItemTemplate of ListView

查看:172
本文介绍了内ListView控件的EditItemTemplate的AsyncFileUpload的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法处理内的 AsyncFileUpload 控制 EditItemTemplate中的ListView

I'm having trouble handling an AsyncFileUpload control within an EditItemTemplate in a ListView.

我如何处理参考在文件后面code中的 OnUploadedComplete 事件时,在 AsyncFileUpload 控制?

How do I reference the the AsyncFileUpload control when handling the OnUploadedComplete event in the code behind file?

我知道我可以在 OnItemUpdating 事件的的ListView 中引用,但因为它是一个 AsyncFileUpload 我怎么保存更新到的ListView 项目之前上传的文件?

I know that I can reference it within the OnItemUpdating event for the ListView but since it's an AsyncFileUpload how do I upload the file before saving the updates to the ListView item?

感谢

推荐答案

您可以参考它铸造发件人在事件处理code:

You can reference it casting sender in the event handling code :

protected void AttachmentAsyncFileUpload_Complete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
    var FileUploader = sender as AjaxToolkit.AsyncFileUpload;
    FileUploader.SaveAs("testuploadedfile.tmp");
}

这篇关于内ListView控件的EditItemTemplate的AsyncFileUpload的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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