I have a file upload control that has been working fine until I made some unrelated (in theory) changes over the last couple of weeks and now the file upload doesn't work.
The OnClientUploadComplete is an client side event handler. And it must be bound to JavaScript function. Just add onto your page script element with this function:
So, you should have something as below in your js code:
<script type="text/javascript">
function UploadComplete() {
alert("File uploaded");
}
function UploadStart() {
alert("File uploaded");
}
You could refer to the tutorial below about how to use AjaxFileUpload:
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
140 Points
590 Posts
ajaxToolkit:AjaxFileUpload Issues
Oct 03, 2017 02:19 PM|RageRiot|LINK
Hi,
I have a file upload control that has been working fine until I made some unrelated (in theory) changes over the last couple of weeks and now the file upload doesn't work.
https://imgur.com/a/DAGRN
As a test, I created a new file upload:
But as soon as I apply client events, it doesn't render (see above):
I've compared the output and the two versions are identical, apart from the initialisation function that is automatically created:
Anyone know what's happened and how to fix?
Star
8670 Points
2882 Posts
Re: ajaxToolkit:AjaxFileUpload Issues
Oct 04, 2017 08:18 AM|Cathy Zou|LINK
Hi RageRiot,
The OnClientUploadComplete is an client side event handler. And it must be bound to JavaScript function. Just add onto your page script element with this function:
So, you should have something as below in your js code:
You could refer to the tutorial below about how to use AjaxFileUpload:
http://www.c-sharpcorner.com/article/ajax-control-toolkit-tutorial-ajaxfileupload-part-three/
https://ajaxcontroltoolkit.devexpress.com/AjaxFileUpload/AjaxFileUpload.aspx
Best regards
Cathy
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
140 Points
590 Posts
Re: ajaxToolkit:AjaxFileUpload Issues
Oct 04, 2017 02:21 PM|RageRiot|LINK
Thanks Cathy, somehow I had deleted the UploadStart() function!