Actually unexpected error u get i think for not doing ClientIDMode="AutoID" at right click control at design...go to property...make ClientIDMode="AutoID"
AsyncFileUpload - AsyncFileUpload is an ASP.NET AJAX Control that allows you asynchronously upload files to server. The file uploading results can be checked both in the server and client sides.
AjaxFileUpload- AjaxFileUpload is an ASP.NET Ajax control which enables you to upload multiple files to the server asynchronously. When the control is used with a browser which supports the latest features of HTML5 -- such as Microsoft
Internet Explorer 10, Mozilla Firefox 9, or Google Chrome 17 -- then the AjaxFileUpload supports displaying file upload progress. The control displays a progress bar as the file is being uploaded.
If a browser does not support the HTML5 File API (for example, Internet Explorer 9) then upload progress is not displayed and a throbber image is displayed instead. In other words, a busy wait image is displayed instead of actual progress.
The AjaxFileUpload control also supports a drag-and-drop interface. You can add multiple files to the AjaxFileUpload upload queue by dragging the files onto the AjaxFileUpload control on a page. Alternatively, you can select multiple files to
upload by using the SHIFT key or CTRL key when selecting files with the file upload dialog. These features are not supported by older browsers.
By taking advantage of the AllowedFileTypes property, you can restrict the types of files which can be uploaded with the AjaxFileUpload control. For example, you can prevent any file except image files (files with the extensions jpeg, png, or
gif) from being uploaded. By taking advantage of the MaximumNumberOfFiles property, you can limit the number of files which can be uploaded with the control. For example, you can prevent a user from uploading more than 5 files.
Chetan Sarode
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Marked as answer by moshik.salem on Aug 07, 2012 07:00 AM
moshik.salem
Member
34 Points
124 Posts
AjaxFileUpload control vs. AsyncFileUpload control?
Aug 06, 2012 09:39 AM|LINK
hi,
can someone tell me what is the difference between the AjaxFileUpload control and the AsyncFileUpload control?
can anyone post an examples for those controls?
i tried to use the AjaxFileUpload and got an java script error can anyone also tell me what's wrong there?
thank you.
Keyur Shah
Participant
1002 Points
278 Posts
Re: AjaxFileUpload control vs. AsyncFileUpload control?
Aug 06, 2012 12:31 PM|LINK
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AjaxFileUpload/AjaxFileUpload.aspx
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AsyncFileUpload/AsyncFileUpload.aspx
You can get the difference between both from here with example.
india.999
Member
225 Points
116 Posts
Re: AjaxFileUpload control vs. AsyncFileUpload control?
Aug 06, 2012 12:48 PM|LINK
<script type="text/javascript">
function showUploadConfirmation() {
alert("Upload finished!");
}
</script>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:AsyncFileUpload ID="AsyncFileUpload2" runat="server" UploadingBackColor="Yellow"
OnUploadedComplete="ProcessUpload"
OnClientUploadComplete="showUploadConfirmation" ThrobberID="spanUploading"
ClientIDMode="AutoID"/>
<span id="spanUploading" runat="server">Uploading...</span>
at .cs page
protected void ProcessUpload(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
string imgName = AsyncFileUpload2.FileName.ToString();
string imgPath = "ImageStorage/" + imgName;
AsyncFileUpload2.SaveAs(Server.MapPath(imgPath));
}
Actually unexpected error u get i think for not doing ClientIDMode="AutoID" at right click control at design...go to property...make ClientIDMode="AutoID"
It is working ...check it out.
chetan.sarod...
All-Star
66589 Points
11270 Posts
Re: AjaxFileUpload control vs. AsyncFileUpload control?
Aug 07, 2012 03:22 AM|LINK
AsyncFileUpload - AsyncFileUpload is an ASP.NET AJAX Control that allows you asynchronously upload files to server. The file uploading results can be checked both in the server and client sides.
AjaxFileUpload- AjaxFileUpload is an ASP.NET Ajax control which enables you to upload multiple files to the server asynchronously. When the control is used with a browser which supports the latest features of HTML5 -- such as Microsoft Internet Explorer 10, Mozilla Firefox 9, or Google Chrome 17 -- then the AjaxFileUpload supports displaying file upload progress. The control displays a progress bar as the file is being uploaded.
If a browser does not support the HTML5 File API (for example, Internet Explorer 9) then upload progress is not displayed and a throbber image is displayed instead. In other words, a busy wait image is displayed instead of actual progress.
The AjaxFileUpload control also supports a drag-and-drop interface. You can add multiple files to the AjaxFileUpload upload queue by dragging the files onto the AjaxFileUpload control on a page. Alternatively, you can select multiple files to upload by using the SHIFT key or CTRL key when selecting files with the file upload dialog. These features are not supported by older browsers.
By taking advantage of the AllowedFileTypes property, you can restrict the types of files which can be uploaded with the AjaxFileUpload control. For example, you can prevent any file except image files (files with the extensions jpeg, png, or gif) from being uploaded. By taking advantage of the MaximumNumberOfFiles property, you can limit the number of files which can be uploaded with the control. For example, you can prevent a user from uploading more than 5 files.
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.