I can not handle radupload and radprogress..

Thread is closed for posting
2 posts, 0 answers
  1. Fabio Cirillo
    Fabio Cirillo avatar
    180 posts
    Member since:
    Jan 2010

    Posted 28 Nov 2012 Link to this post

    Help me :(

    i created a web page that has a object radupload with the property automatic upload....In this page i've inserted the object radprogress too.
    The radupload works perfectly, but the radprogress no!
    The radprogress does not appear...
    (i use telerik Q3 2012)
    this my code vb 2010 and aspx and my web.cofig

    Private Sub Imgbtnupload_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles Imgbtnupload.Click
            If RadUpload1.UploadedFiles.Count > 0 Then
                Label1.Text = "File uploaded: " & RadUpload1.UploadedFiles.Item(0).FileName & "(" & RadUpload1.UploadedFiles.Item(0).ContentLength & " " & "bytes)"
            Else
                Label1.Visible = True
            End If
        End Sub
    <form id="form1" runat="server">
        <telerik:RadAjaxManager runat="server">
        </telerik:RadAjaxManager>
        <div style="font-family: Verdana; font-size: small; background-image: url('Image/Upload.jpg'); background-repeat: no-repeat; width: 350px; height: 380px">
             <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
                 Skin="Office2010Silver">
             </telerik:RadAjaxLoadingPanel>
             <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
            </telerik:RadScriptManager>
                 <telerik:RadProgressManager ID="RadProgressManager1" Runat="server" />
                 <table style="border: 0px; margin: 0px; padding: 0px; width: 350px;">
                     <tr>
                         <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center; height:23px"
                             colspan="2">
                              </td>
                     </tr>
                     <tr>
                         <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center; height:23px"
                             colspan="2">
                             </td>
                     </tr>
                     <tr>
                         <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center; height:23px"
                             colspan="2">
                             <asp:Label ID="Label1" runat="server" Text="Nessun file caricato"
                            ForeColor="Green"></asp:Label>
                         </td>
                     </tr>
                     <tr>
                         <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: left; vertical-align: top; height: 50px"
                             colspan="2">
                             <telerik:RadUpload ID="RadUpload1" Runat="server"
                            AllowedFileExtensions="jpg,jpeg,png,gif" OverwriteExistingFiles="True"
                            TargetFolder="image/image_utenti" ControlObjectsVisibility="None"
                            InputSize="40" Height="22px" style="text-align: left" Skin="Sunset"
                                 Width="343px">
                                 <Localization Select="Cerca" />
                             </telerik:RadUpload>
                             <asp:CustomValidator ID="CustomValidator1" runat="server"
                            ErrorMessage="File errato o non selezionato" ClientValidationFunction="validateRadUpload"
                            OnServerValidate="CustomValidator1_ServerValidate" ForeColor="Red"></asp:CustomValidator>
                             <div style="font-size:x-small">
                                 Il file deve avere le seguenti estensioni: .jpg, .jpeg, .png
                             </div>
                             <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                                         <script type="text/javascript">
                                             function validateRadUpload(source, e) {
                                                 e.IsValid = false;
                                                 var upload = $find("<%= RadUpload1.ClientID %>");
                                                 var inputs = upload.getFileInputs();
                                                 for (var i = 0; i < inputs.length; i++) {
                                                     //check for empty string or invalid extension    
                                                     if (inputs[i].value != "" && upload.isExtensionValid(inputs[i].value)) {
                                                         e.IsValid = true;
                                                         break;
                                                     }
                                                 }
                                             }
                     
                                         </script>
                             </telerik:RadCodeBlock>
                         </td>
                     </tr>
                     <tr>
                         <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center; height:10px"
                             colspan="2">
                              </td>
                     </tr>
                     <tr>
                         <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center; height:40px">
                             <asp:ImageButton ID="Imgbtnupload" runat="server"
                                 ImageUrl="~/Image/Upload.png" />
                         </td>
                         <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center; height:40px">
                             <asp:ImageButton ID="Imgbtnesci" runat="server" ImageUrl="~/Image/esci1.png"
                                 ValidationGroup="esci" />
                         </td>
                     </tr>
                     <tr>
                         <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center; height:23px"
                             colspan="2">
                              </td>
                     </tr>
                     <tr>
                         <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center; height:130px"
                             colspan="2">
                             <telerik:RadProgressArea ID="RadProgressArea1" Runat="server"
                                 HeaderText="Caricamento in corso attendere..." Height="130px" Skin="Sunset"
                                 progressindicators="FilesCountBar, FilesCount, FilesCountPercent, SelectedFilesCount, CurrentFileName"
                                 Width="350px">
                             </telerik:RadProgressArea>
                         </td>
                     </tr>
                 </table>
        </div>
        </form>
    <?xml version="1.0"?>
    <configuration>
      <appSettings>
        <add key="Telerik.Skin" value="Sunset" />
        <add key="Telerik.ScriptManager.TelerikCdn" value="Enabled" />
        <add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled" />
      </appSettings>
      <system.web>
        <httpRuntime maxRequestLength="102400" executionTimeout="3600" />
        <customErrors mode="Off" />
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          </assemblies>
        </compilation>
        <pages>
          <controls>
            <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
          </controls>
        </pages>
        <httpHandlers>
          <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
          <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
        </httpHandlers>
        <httpModules>
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
        </httpModules>
      </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
          <remove name="RadUploadModule" />
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
          <remove name="RadCompression" />
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
        </modules>
        <handlers>
          <remove name="ChartImage_axd" />
          <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
          <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
          <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
          <remove name="Telerik_Web_UI_DialogHandler_aspx" />
          <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
          <remove name="Telerik_RadUploadProgressHandler_ashx" />
          <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
          <remove name="Telerik_Web_UI_WebResource_axd" />
          <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
          <add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode" />
        </handlers>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="104857600" />
          </requestFiltering>
        </security>
      </system.webServer>
    </configuration>
  2. Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 03 Dec 2012 Link to this post

    Hi,

     
    Such unusual behavior is  most probably caused by not setting the configuration of RadProgressArea settings in the Web Config. You can refer to this help topic where the recommended settings are explained.


    You can also review the Known limitation section in case you your case is listed there.

    Hope this will be helpful.

    Regards,
    Plamen
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top