AjaxFileUpload adding OnClientUploadCompleteAll breaks layout

I have the following:

<ajaxToolkit:AjaxFileUpload ID="afuPhotosUpload" runat="server"
    AllowedFileTypes="jpg,jpeg,png,gif"
    OnUploadComplete="afuPhotosUpload_UploadComplete" />

This works completely fine but as soon as I add OnClientUploadCompleteAll like this:

<ajaxToolkit:AjaxFileUpload ID="afuPhotosUpload" runat="server"
    AllowedFileTypes="jpg,jpeg,png,gif"
    OnUploadComplete="afuPhotosUpload_UploadComplete"
    OnClientUploadCompleteAll='__doPostBack("HiddenButton", "");' />

The layout of the the control freaks out and becomes almost unusable. Can anyone see what I'm doing wrong?

Answers:

Answer

You need to pass it a javascript function name only.

OnClientUploadCompleteAll="UploadCompleteFunctionName"

For whatever reason, they decided to treat it in same way as declaring the server-side function to execute.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.