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

Problem with Radupload and visibility Radprogressarea

3 Answers 59 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Fabio Cirillo
Top achievements
Rank 1
Fabio Cirillo asked on 26 Nov 2012, 04:57 PM
when I upload the image is sent but does not appear radprogressarea, why?

<form id="form1" runat="server">
         <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        <telerik:RadProgressManager ID="RadProgressManager1" Runat="server" />
        <br />
        <table style="width:100%;">
                    <telerik:RadUpload ID="RadUpload1" Runat="server"
                        AllowedFileExtensions=".jpg,.jpeg" OverwriteExistingFiles="True"
                    <asp:Label ID="Label1" runat="server" Text="Nessun file caricato"></asp:Label>
                    <telerik:RadProgressArea ID="RadProgressArea1" Runat="server">
                    <asp:Repeater ID="Repeater1" runat="server" Visible="False">
                                        <div class="title">
                                        File caricato:</div>
                                            <%#DataBinder.Eval(Container.DataItem, "FileName")%>
                                            <%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>
                                            <br />
                    <asp:Button ID="Button1" runat="server" Text="Button" />

Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.IO
Imports System.Web
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports Telerik.Web.UI
Public Class UploadImgCard
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    End Sub
    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If RadUpload1.UploadedFiles.Count > 0 Then
            Repeater1.DataSource = RadUpload1.UploadedFiles
            Label1.Visible = False
            Repeater1.Visible = True
            Label1.Visible = True
            Repeater1.Visible = False
        End If
    End Sub
    Private callBack As CacheItemRemovedCallback
    Private Sub AddDeleteDependencyForFile(ByVal uploadedFileCollection As UploadedFileCollection)
        Dim uploadedFile As UploadedFile
        For Each uploadedFile In uploadedFileCollection
            Dim timeOut As TimeSpan = TimeSpan.FromMinutes(5)
            callBack = New CacheItemRemovedCallback(AddressOf DeleteFile)
            Dim fullPath As String = Path.Combine(Server.MapPath(RadUpload1.TargetFolder), uploadedFile.GetName())
            Context.Cache.Insert(uploadedFile.FileName, fullPath, Nothing, DateTime.Now.Add(timeOut), TimeSpan.Zero, CacheItemPriority.Default, callBack)
    End Sub
    Private Sub DeleteFile(ByVal key As String, ByVal path As Object, ByVal reason As CacheItemRemovedReason)
        File.Delete(DirectCast(path, String))
    End Sub
    Protected Sub RadUpload1_FileExists(sender As Object, e As Telerik.Web.UI.Upload.UploadedFileEventArgs) Handles RadUpload1.FileExists
        Dim counter As Integer = 1
        Dim file As UploadedFile = e.UploadedFile
        Dim targetFolder As String = Server.MapPath(RadUpload1.TargetFolder)
        Dim targetFileName As String = Path.Combine(targetFolder, file.GetNameWithoutExtension() + counter.ToString() + file.GetExtension())
        While System.IO.File.Exists(targetFileName)
            counter += 1
            targetFileName = Path.Combine(targetFolder, file.GetNameWithoutExtension() + counter.ToString() + file.GetExtension())
        End While
    End Sub
End Class

3 Answers, 1 is accepted

Sort by
Telerik team
answered on 29 Nov 2012, 04:22 PM
Hello Fabio,

I tested the page that you provided but it works as expected from my side. However, please keep in mind that if you are uploading small files it is expected that the RadProgressArea will not appear since the uploading process completes very fast. Attached to this post is a page that works as expected from my side and the RadProgressArea shows once I upload larger file in the folder (note that I needed to change some of the settings in the web.config file as explained here). You can also refer to the following help article for more detailed information - RadProgressArea Does Not Appear.

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.
Fabio Cirillo
Top achievements
Rank 1
answered on 29 Nov 2012, 04:46 PM
No function, i send you my web.config, please can you see it?

<?xml version="1.0"?>
    <add key="Telerik.Skin" value="Sunset"/>
    <add key="Telerik.ScriptManager.TelerikCdn" value="Enabled"/>
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled"/>
  <location path="Telerik.RadUploadProgressHandler.ashx">
        <allow users="*"/>
      </authorization >
    <httpRuntime maxRequestLength="102400" executionTimeout="3600"/>
    <customErrors mode="Off"/>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
        <add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Speech, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
     <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"/>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/>
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
    <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"/>
      <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"/>
Telerik team
answered on 04 Dec 2012, 02:21 PM
Hello Fabio,

I tested the page that I attached to my previous post with the web.config file that you provided and still the issue that you describe is not present. Did you try out the suggestions in the help article that I provided with my previous reply? How did it go?

Kind regards,
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.
Upload (Obsolete)
Asked by
Fabio Cirillo
Top achievements
Rank 1
Answers by
Telerik team
Fabio Cirillo
Top achievements
Rank 1
Share this question