Hi All
i m Uploading File using Ajax AsyncFileUpload control.. after successfull upload i am trying to dispaly success message through Label and Also through Alert but its not working..below is i used code
<asp:Panel ID="pnlupload" runat="server" BackColor="LightBlue"
CssClass="pnlBackGround" Height="100px" style="display:none" Width="600px">
<asp:Label ID="lblmsg" runat="server" Font-Bold="True" Text="" ForeColor="Red"></asp:Label>
<table ID="tabid" runat="server" cellpadding="0" cellspacing="0"
style="border:Solid 2px #D46900; width:100%; height:100%" width="100%">
<tr>
<td>
<asp:AsyncFileUpload ID="AsyncFileUpload1" runat="server" CompleteBackColor="#66CCFF" OnLoad="AsyncFileUpload1_Load" OnUploadedFileError="AsyncFileUpload1_UploadedFileError" UploadingBackColor="#FFFDF8" Width="80px" onuploadedcomplete="AsyncFileUpload1_UploadedComplete" />
<asp:Button ID="update" runat="server" Text="Upload" OnClick="update_click" />
</td>
</tr>
<tr>
<td align="center">
<asp:Button ID="btnok" runat="server" Text="Close" />
</td>
</tr>
</table>
</asp:Panel>
<asp:ModalPopupExtender ID="modalforupload" runat="server"
Drag="true" PopupControlID="pnlupload" TargetControlID="btnattach" CancelControlID="btnok" >
</asp:ModalPopupExtender>
public void update_click(object sender, EventArgs e)
{
if (AsyncFileUpload1.HasFile) // Check the file
{
AsyncFileUpload1.SaveAs(Server.MapPath("~/EmailAttachments/" + AsyncFileUpload1.FileName)); // Save the file
lblsub.Text = "<b><blink>" + AsyncFileUpload1.FileName + " " + "Uploaded Successfully" + "</blink><b>";//Not working
ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('"+lblmsg.Text+"');", true); //Not working
}
}
how can i dispalay the message and AsyncFileUpload1
thanks in advance