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

[Solved] Progress area does not show - help!

2 Answers 129 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Clive Hoggar
Top achievements
Rank 1
Clive Hoggar asked on 13 Apr 2009, 07:29 PM
Hi

Like others in this forum I just can't get the progress area to show.
I have the simplest possible page:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="upload-test.aspx.vb" Inherits="admin_upload_test" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadUpload ID="RadUpload1" runat="server" TargetFolder="~/sermons/"   
            Skin="Gray">  
        </telerik:RadUpload> 
          
            <asp:button ID="button1" runat="server" Text="Submit" OnClick="button1_Click" /> 
              
            <telerik:RadProgressManager id="Radprogressmanager1" skin="Gray" runat="server" /> 
              
            <telerik:RadProgressArea id="RadProgressArea1" skin="Gray" runat="server" /> 
    </div> 
    </form> 
</body> 
</html> 
The code behind is as recomended in the getting started docs
Imports Telerik.Web.UI  
Partial Class admin_upload_test  
    Inherits System.Web.UI.Page  
 
    Protected Sub Button1_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles Button1.Click  
 
        If RadUpload1.UploadedFiles.Count > 0 Then 
            RadProgressArea1.Visible = True 
            System.Threading.Thread.Sleep(6000)  
        End If 
    End Sub 
End Class 

and I have followed the full getting started procedure to modify the web.config file.

The result is that the file is uploaded to the requisite folder, but the progress area is never visible.

There are no error messages, so I am stuck for knowing where to check for the problem.
Can you suggest where to start looking?
 
I really thought this was going be easier than writing a classic asp script ands using aspUpload
the old-fashioned way!

Thanks

Clive

2 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 14 Apr 2009, 11:01 AM
Hello Clive Hoggar,

By the time Button1_Click event fires, the files are already uploaded and sleeping the thread in not needed. You might have got confused by the custom progress article where Thread.Sleep is used. Please have in mind that custom progress has nothing to do with file upload monitoring.

The progress area will appear automatically when upload begins, there is no need to do anything ( except for registering the handlers and the modules in the web config). However, please keep that if you are making your tests on a local host it is highly unlikely to see the progress area for small files, because they are uploaded before there is time for the latter to show up. This is due to the upload speed on a local host. The speed is 7-9 mb/s. I suggest you to try to upload large file ( filesize > 100mb) and observe whether there is a progress area shown.

Kind regards,
Genady Sergeev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Clive Hoggar
Top achievements
Rank 1
answered on 14 Apr 2009, 03:06 PM
You are right - it IS working, when I upload a big file (50Meg) on my local machine
it does appear.
Thanks

Clive
Tags
Upload (Obsolete)
Asked by
Clive Hoggar
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Clive Hoggar
Top achievements
Rank 1
Share this question
or