Skip to content

Commit

Permalink
AjaxFileUpload sample page updated
Browse files Browse the repository at this point in the history
Added example for OnClientUploadError property
  • Loading branch information
MikhailTymchukDX committed Oct 15, 2015
1 parent ffb00d3 commit f8ccdab
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion AjaxControlToolkit.SampleSite/AjaxFileUpload/AjaxFileUpload.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
document.getElementById('uploadCompleteInfo').innerHTML = 'Please wait while uploading ' + e.get_filesInQueue() + ' files...';
}
function onClientUploadError(sender, e) {
document.getElementById('uploadCompleteInfo').innerHTML = "There was an error while uploading.";
}
function onClientUploadCompleteAll(sender, e) {
var args = JSON.parse(e.get_serverArguments()),
Expand All @@ -81,7 +85,12 @@
<ajaxToolkit:AjaxFileUpload ID="AjaxFileUpload1" runat="server" Padding-Bottom="4"
Padding-Left="2" Padding-Right="1" Padding-Top="4" ThrobberID="myThrobber" OnClientUploadComplete="onClientUploadComplete"
OnUploadComplete="AjaxFileUpload1_OnUploadComplete" MaximumNumberOfFiles="10"
AllowedFileTypes="jpg,jpeg" OnClientUploadCompleteAll="onClientUploadCompleteAll" OnUploadCompleteAll="AjaxFileUpload1_UploadCompleteAll" OnUploadStart="AjaxFileUpload1_UploadStart" OnClientUploadStart="onClientUploadStart" />
AllowedFileTypes="jpg,jpeg"
OnClientUploadCompleteAll="onClientUploadCompleteAll"
OnUploadCompleteAll="AjaxFileUpload1_UploadCompleteAll"
OnUploadStart="AjaxFileUpload1_UploadStart"
OnClientUploadStart="onClientUploadStart"
OnClientUploadError="onClientUploadError" />

<div id="uploadCompleteInfo"></div>
<br />
Expand Down

0 comments on commit f8ccdab

Please sign in to comment.