I want to upload a file using AjaxFileUpload
control. This works fine.The problem is i am not able to display the success/failure message on Label
of file uploaded.
.aspx code..
<form id="form1" runat="server">
<div>
<div></div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Label runat="server" ID="myThrobber" Style="display: none;"><img align="absmiddle" alt="" src="images/uploading.gif"/></asp:Label>
<asp:AjaxFileUpload ID="AjaxFileUpload1"
runat="server"
OnUploadComplete="AjaxFileUpload1_UploadComplete"
OnClientUploadError="uploadError"
OnClientUploadComplete="uploadComplete"
ThrobberID="myThrobber"
MaximumNumberOfFiles="1"
AllowedFileTypes=""
class="name_text1"
Width="200px" />
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
<asp:Button ID="BtnClose" runat="server" Text="Close"
onclick="BtnClose_Click" OnClientClick="Closepopup()"/>
<asp:Label ID="Label2" runat="server" Text=""></asp:Label>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
i want to display text on Label2 that file uploaded or not. my .cs code:
protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
string message = "Storege Space is Exceeding its Limit";
Label2.Text = message;
}
How to display message on Label
? Any Suggesstion? Help appreciated