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

RadUpload in a masterpage/user controls scenario

5 Answers 71 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 05 Jun 2009, 01:32 PM
What is the recommended way to use RadUpload in a masterpage / user controls scenario?

I have multiple user controls which contain RadUpload control. It is possible, that more than one of these controls will be visible on a page.

I would like to display the upload progress using RadProgressManager/RadProgressArea controls, but I'm not sure what the recommended/best way is in that scenario:
  • should I place a RadProgressManager/Area on each user control containing a RadUpload control?
  • or should I put one RadProgressManager/Area onto the master page?

It's not clear to me, how the RadUpload controls "selects" a RadProgressManager/Area to display the progress.

Thanks for your help.

5 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 08 Jun 2009, 12:09 PM
Hello Martin,

There should be no problem to use one progress area placed in the master page for all the content pages. This is due to the way the master pages work. When you built your website and the result page is sent to the browser, the rendered result is a composite between the master page and the content page. So at a time, there is only one upload and one progress area rendered. Once you navigate to other page that contains RadUpload, the previous page is removed and the new one is placed instead. And this is how it goes. RadUpload does not select a ProgressArea. The progress area will automatically monitor all requests that are big enough. You can easily check this if you replace the RadUpload with a standard file input. The progress area will work.

To sum up: to use one progress area in the master page is better than placing an instance of the latter in all the content pages.

Best wishes,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Martin
Top achievements
Rank 1
answered on 08 Jun 2009, 12:34 PM
Hi Genady, thanks for your answer.
I guess you misunderstood my question (but the answer will probably be the same):

I have one master page and one content page. The content page contains two user controls. Each user controls contains a RadUpload control. Now the question was:
  • do I put a RadProgressArea into each user control?
  • or should I just put one progress area to the master page?

From your reply, I guess the latter approach is the correct one?

Thanks,
Martin
0
Veselin Vasilev
Telerik team
answered on 10 Jun 2009, 09:19 AM
Hello Martin,

I believe all of the options will work similarly:
  • RadProgressArea is in the master page
  • RadProgressArea is in one of the user controls
  • RadProgressArea is in all user controls.

Regards,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Roberto
Top achievements
Rank 2
answered on 19 Sep 2009, 12:09 AM
Hi,

could you send me a code sample about this thread?

I want to use the RadUpload control inside my own user control but when i tried to get the file

RadUpload1.UploadedFiles[0]


i get an error cause the array is empty.
0
Genady Sergeev
Telerik team
answered on 23 Sep 2009, 09:57 AM
Hello Roberto,

You can find the sample as an attachment. I hope it will help you to get started.

Sincerely yours,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Upload (Obsolete)
Asked by
Martin
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Martin
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Roberto
Top achievements
Rank 2
Share this question
or