感謝您的關注, 我是ASP.NET AJAX AsyncFileUpload的新手,所以我創建了一個aspx頁面來測試它,但它似乎有一些與該控件的錯誤,因爲服務器端UploadedComplete事件不會觸發。ASP.NET AJAX AsyncFileUpload UploadedComplete不會觸發
的ASPX:
<form id="form1" runat="server" method="post" enctype="multipart/form-data">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<cc1:AsyncFileUpload ID="AsyncFileUpload1" runat="server" OnUploadedComplete="AsyncFileUpload1_UploadedComplete" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
背後
public partial class Tester : System.Web.UI.Page
{
protected void AsyncFileUpload1_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
this.Label1.Text = "OK";
}
}
會有人請讓我知道爲什麼它不工作的代碼? 非常感謝
你試過我的回答嗎? – 2011-09-28 14:49:50