This is a migrated thread and some comments may be shown as answers.
RadAsyncUpload and CustomValidator
3 Answers 56 Views
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 27 Mar 2013, 09:35 AM
I am trying to get the CustomValidator to work with the RadAsyncUpload, but not having any luck.

I have tried the example from here http://www.telerik.com/community/forums/aspnet-ajax/async-upload/required-validator-and-radasyncupload.aspx but the javascript never fires. What links the 2 controls togther? Normally I would set the ControlToValidate property of the CustomValidator, but that also does not work.

I have simplified the example (Should always fail validataion), but still no luck

   <script type="text/javascript">
      function validateUpload(sender, args) {
            args.IsValid = false;
        }
   </script>
 
 <div>
     <tel:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MultipleFileSelection="Automatic" />
      <asp:CustomValidator runat="server" ID="CustomValidator" ClientValidationFunction="validateUpload" ErrorMessage="Select at least a single file" />
</div>

3 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 27 Mar 2013, 11:59 AM
Bit of an update..

If I add a textbox onto the page with validation, the RadSyncUpload validation will trigger when the textbox is updated and its seperate validation is triggered 
0
Mark
Top achievements
Rank 1
answered on 27 Mar 2013, 12:57 PM
Fixed, I just call Page_ClientValidate('MyGroup') on FileUploaded
0
Hristo Valyavicharski
Telerik team
answered on 28 Mar 2013, 03:16 PM
Hi Mark,

Thank you for sharing this with the community. 

Regards,
Hristo Valyavicharski
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Hristo Valyavicharski
Telerik team
Share this question
or