Click here to Skip to main content
16,012,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My aspx code is:-------


<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>

<asp:Button ID="btnUpload" runat="server"
Text="Upload File"/>
<asp:ModalPopupExtender runat="server"
ID="modelPopupExtender1"
TargetControlID="btnUpload"
PopupControlID="popUpPanel"
OkControlID="btOK"
BackgroundCssClass="modalBackground">

<asp:Panel ID="popUpPanel" runat="server" CssClass="pnl">

<asp:AjaxFileUpload ID="AjaxFileUpload1"
runat="server"
OnClientUploadError="uploadError"
ThrobberID="myThrobber"
MaximumNumberOfFiles="1"
AllowedFileTypes=""
Width="200px" onuploadcomplete="AjaxFileUpload1_UploadComplete" />
<asp:Label runat="server" ID="myThrobber" Style="display: none;"><img align="absmiddle" alt="" src="uploaderImg/uploading.gif"/>



<asp:Label ID="lblMessage" runat="server"/>


<asp:Button ID="btOK" runat="server" Text="OK" />
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="close"
OnClientClick="$find('modelPopupExtender1').hide(); return false;"/>



my .cs code is-------Ajax control is stopped at 98% to its progress bar and file is not upload.using ajax control in asp.net....plzzz help me...

protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
try
{
string path = Server.MapPath("~/worker/DiffImage") + e.FileName;
AjaxFileUpload1.SaveAs(path);
}
catch (Exception)
{ }

}
Posted
Updated 3-Jan-13 19:19pm
v2
Comments
abhay bansal 4-Jan-13 4:39am    
Did you try putting a bigger size file for progress bar. What is the behavior for different size files.
rahemani_1200 4-Jan-13 6:22am    
No change hear ,and one more thing it display successfully message when file is not uploaded.......plzz help me..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900