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

ProgressIndicators

7 Answers 144 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Yasser
Top achievements
Rank 1
Yasser asked on 11 Nov 2008, 10:29 AM
RadProgressArea1.ProgressIndicators &= ~ProgressIndicators.SelectedFilesCount;

gives me the following error:

Error 1 Operator '&=' cannot be applied to operands of type 'Telerik.WebControls.ProgressIndicators' and 'Telerik.Web.UI.Upload.ProgressIndicators'

Error 2 Cannot implicitly convert type 'Telerik.Web.UI.Upload.ProgressIndicators' to 'Telerik.WebControls.ProgressIndicators'. An explicit conversion exists (are you missing a cast?) 

7 Answers, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 11 Nov 2008, 11:36 AM
Hi Yasser,

It seems you have references to both RadUpload for ASP.NET (RadUpload.Net2.dll) and RadControls for ASP.NET Ajax (Telerik.Web.UI.dll). Please, remove the redundant using clause. By the way, you could remove the reference to the redundant assembly also (e.g. RadUpload.Net2).

All the best,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Yasser
Top achievements
Rank 1
answered on 11 Nov 2008, 11:49 AM
my web config is register as following:

<

 

httpHandlers>  

 

 

<

 

 

 

 

add path="ChartAxd.axd" verb="*" type="Dundas.Charting.WebControl.ChartHttpHandler" validate="false"/>

 

 

 <

 

 

 

 

add verb="*" path="Telerik.RadUploadProgressHandler.aspx" type="Telerik.WebControls.RadUploadProgressHandler, RadUpload.Net2" />

 

 

 </

 

 

 

 

httpHandlers>

 

 

 <

 

 

 

 

httpModules>  

 

 

<

 

 

 

 

add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  

 

 

<

 

 

 

 

add name="RadUploadModule" type="Telerik.WebControls.RadUploadHttpModule, RadUpload.Net2" />  

 

 

</

 

 

 

 

httpModules>

 

 

 

 

 

 

and here is my cs page:

 

using

 

 

System;

 

 

 

 

using

 

 

System.Collections;

 

 

 

 

using

 

 

System.ComponentModel;

 

 

 

 

using

 

 

System.Data;

 

 

 

 

using

 

 

System.Drawing;

 

 

 

 

using

 

 

System.Web;

 

 

 

 

using

 

 

System.Web.SessionState;

 

 

 

 

using

 

 

System.Web.UI;

 

 

 

 

using

 

 

System.Web.UI.WebControls;

 

 

 

 

using

 

 

System.Web.UI.HtmlControls;

 

 

 

 

using

 

 

Telerik.Web.UI;

 

 

 

 

using

 

 

Telerik.Web.UI.Upload;

 

 

 

 

 

 

 

 

public

 

 

partial class UploadFile : System.Web.UI.Page

 

 

 

 

 

{

 

 

 

 

protected void Page_Load(object sender, System.EventArgs e)

 

{

RadProgressArea1.ProgressIndicators &= ~

 

ProgressIndicators.SelectedFilesCount;

 

 

}

 

 

protected void buttonSubmit_Click(object sender, System.EventArgs e)

 

{

 

 

UploadedFile file = UploadedFile.FromHttpPostedFile(Request.Files[File1.UniqueID]);

 

 

 

if(!Object.Equals(file, null))

 

{

LooongMethodWhichUpdatesTheProgressContext(file);

}

}

 

 

private void LooongMethodWhichUpdatesTheProgressContext(UploadedFile file)

 

{

 

 

const int total = 100;

 

 

 

RadProgressContext progress = RadProgressContext.Current;

 

 

 

for (int i = 0; i < total; i++)

 

{

progress.PrimaryTotal = 1;

progress.PrimaryValue = 1;

progress.PrimaryPercent = 100;

progress.SecondaryTotal = total;

progress.SecondaryValue = i;

progress.SecondaryPercent = i;

progress.CurrentOperationText = file.GetName() +

 

" is being processed...";

 

 

 

if (!Response.IsClientConnected)

 

{

 

 

//Cancel button was clicked or the browser was closed, so stop processing

 

 

 

 

 

 

 

break;

 

}

 

 

//Stall the current thread for 0.1 seconds

 

 

 

 

 

System.Threading.

 

Thread.Sleep(100);

 

}

}

 

}

 

0
Erjan Gavalji
Telerik team
answered on 12 Nov 2008, 08:30 AM
Hi Yasser,

Indeed, the web.config file denotes you use the HttpModule and HttpHandler of RadUpload for ASP.NET "Classic". It seems that you have RadUpload for ASP.NET "Classic" on the page and you have a using Telerik.Web.UI clause in the code file.

Please, use the following syntax:

RadProgressArea1.ProgressIndicators &= ~Telerik.WebControls.ProgressIndicators.SelectedFilesCount

Regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Yasser
Top achievements
Rank 1
answered on 12 Nov 2008, 11:26 AM
Thanks a lot for your help....
The page run now without error and file is uploaded BUT the Progress bar does not appear at all.....Please help me urgently as I may lose my client because of delay in delivery.

How Can i send you the files to see the whole code inline.

Best Regards
Yasser
0
Erjan Gavalji
Telerik team
answered on 12 Nov 2008, 11:32 AM
Hi Yasser,

Please, check the list in the RadProgressArea does not wok article. Most probably the reason for the error you experience is described there.

Regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Yasser
Top achievements
Rank 1
answered on 12 Nov 2008, 11:58 AM
I have checked all condition as following:
  ~
  1. The project is hosted in IIS7. RadMemoryOptimization is not supported in IIS7 yet. " I am Using the VisualStudio 2005 Web Development Server "
  2. RadUploadHttpModule and / or RadUploadProgressHandler are not registered in web.config. "I already Registered on Web Config"
  3. There is no RadProgressManager on the page. "There is one"
  4. The files are uploaded with AJAX call. "No Ajax Control"
  5. There is a URL rewriter in the application. "How Can I test this??????????????????????????????????? "
  6. There are other HTTP modules in the application which are designed to handle file uploads. "Not Exist"
  7. The application level trace is enabled in web.config. "Trace is Disable"
  8. The application is hosted in a web garden or web farm."No web garden or Web Farm"
0
Erjan Gavalji
Telerik team
answered on 12 Nov 2008, 12:27 PM
Hi Yasser,

If a URL rewriter exists, it would be located either in the application source code, or in some of the referred assemblies. Typically a URL rewriter is added using the Global.asax file.

You could open a formal support ticket to send us the files.

Regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Upload (Obsolete)
Asked by
Yasser
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Yasser
Top achievements
Rank 1
Share this question
or