This is a migrated thread and some comments may be shown as answers.

validationFailed handler not working

1 Answer 43 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
Tim asked on 24 Feb 2012, 10:29 PM
I am trying to get jquery to handle the delivery of a message if the user tries to upload a file that is open. I am using the sample from here to work with. I know I must have missed something because the example from the link does what I want it to do but I am getting the script errors from below from my page.

Microsoft JScript runtime error: Exception thrown and not caught
Microsoft JScript runtime error: Unhandled Error in Silverlight Application [ScriptObject_InvokeFailed]

confusing because this is not a silverlight application but an ASP.NET

here is my client side code from the .ascx file.

<telerik:RadCodeBlock ID="RadFileUploadCodeBlock" runat="server">
    <script type="text/javascript">
        function validationFailed(sender, eventArgs) {
            $(".ErrorHolder").append("<p>Validation failed for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
        function closeDataContainer() {
<div id="container">
    <div id="content-container">
        <div id="content">
            <telerik:RadProgressManager runat="server" ID="RadProgressManager1" />
            <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" MultipleFileSelection="Disabled"
                OnClientValidationFailed="validationFailed" AllowedFileExtensions="xls, xlsx"
                AutoAddFileInputs="True" Height="25px" Width="250px">
                    <telerik:FileFilter Description="*.xls; *. xlsx" Extensions="xls, xlsx"></telerik:FileFilter>
            Select files to upload (xls, xlsx)
        <div id="aside">
            <asp:Button runat="server" ID="BtnSubmit" Text="Process File" OnClick="BtnSubmit_OnClick" />
        <telerik:RadProgressArea runat="server" ID="RadProgressArea1" Width="582px">
        <div id="Div1">
            <asp:PlaceHolder ID="MessagePlaceHolder" Visible="false" runat="server"></asp:PlaceHolder>
        <!-- this is used for client side delivery of AsyncUpload Failure messages -->
        <div class="ErrorHolder">

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 29 Feb 2012, 04:24 PM
Hello Tim,

One of the RadAsyncUpload's upload modes uses Silverlight. You can disable it by setting the DisablePlugins="true" property.

Please find attached a sample project. If you still experience the issue, could you please modify the test project so I can see the error locally?

Hope this will be helpful.

Plamen Zdravkov
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
Top achievements
Rank 2
Answers by
Telerik team
Share this question