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

RadUploadProgressArea/radprogressmanager Custom steps handling in RadWindow (while radUpload is in parent page)

3 Answers 77 Views
Window
This is a migrated thread and some comments may be shown as answers.
Srinivasa
Top achievements
Rank 1
Srinivasa asked on 03 Aug 2011, 08:15 PM

Here below is my scenario (thats actually mimicing the radWindow approach mentioned in this URL :
Using RadUpload Progress area in RadWindow )  in http://www.telerik.com/support/kb/aspnet-ajax/window/using-radupload-progress-area-in-radwindow.aspx)
1) I've a RadUpload (say 'radupload1) control on page1.aspx
2) an asp.net button to indicate upload processing Button (say 'button1') on the same page i.e, page1.aspx
3) a radWindow on the page1.aspx to open page2.aspx (detailing in next point below)
3) I've second page viz., page2.aspx (to open in radWindow from page1.aspx) with radprogressmanager and radprogressarea
4) I'm good about client side things like, opening page2.aspx in radWindow as soon as I hit button1 (as explainied in URL provided), radWindow Closes once upload progress reaches 100%, radwindow closes on Cancel Click (for big files like 50 MB),
However I'm primarily stuck with questions on server side
5) I need to handle custom steps in radProgressArea1 that include file upload/stream to webserver by radUpload, security checks, file conversion to a known standard format, queuing the file to a different service, update the db by DAL layer, then I need to let the radWindow close by itself.
I'm wondering how to stream the file in page2.aspx that has been selected using radUpload on page1.aspx?
the above URL was good for client side operations, is there any code sample/URL that might be handling similar scenario Or Can you please assist on this. Thank you in advance.

Not providing the sample application since my application just followed what was suggested in above URL.

(The low priority thing for me, "nice to have resolution" is : the radWindow cancel taking looong time (appearing like stuck) to refresh page1.aspx)

PS: I should be using Telerik rad controls version 2008.2.723.20

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 04 Aug 2011, 11:14 AM
Hello Srinivasa,


I just answered your support ticket on the matter, yet for your convenience and for others that may experience a similar difficulty I will paste my advise here as well. For the sake of avoiding duplicate posts I would advise in the future that you open only one ticket per issue.





If I understand your issue correctly - you need to pass content from one page to another in the code-behind. This is considered general ASP knowledge and task and is not directly related to our controls. There are some ways to achieve such cross-page communication and it is usually via public properties and methods, you can examine the following links to get you started on this:
http://www.codeproject.com/KB/user-controls/Page_UserControl.aspx
http://www.codeproject.com/Articles/233555/IsCrossPagePostBack-Cross-page-PostBack/?fid=1642761&df=90&mpp=10&noise=3&prof=True&sort=Position&view=Quick&pageflow=Fluid&display=Mobile
http://asp.net.bigresource.com/Access-a-Method-in-a-Master-Page-Code-Behind-from-another-Master-Page--VS70QV0SZ.html

or the following google search on a similar matter:
http://www.google.com/search?&q=access+one+page+method+from+another+page+in+the+code-behind

I would also like to point out that the RadWindow is primarily a client-side object that is designed for creating a comfortable UI and is best used with JavaScript.

All this being said I believe there is another possible approach you can take - you could try using the RadWindow's ContentTemplate to put the progress area controls in it. It does not require an external page and does not create an iframe, instead the content is a part of the main page. This way you can easily access the controls in the code-behind. For more information on the difference you can examine this online demo and this help article. The only issue with this approach is that this functionality is relatively new and it is not present in the version you are currently using. Therefore I would advise that you upgrade to the latest version, as thus you will also benefit from the new fixes and features that have been incorporated in the past three years.

If you are still experiencing difficulties I would also recommend that you examine the second option from the KB article that also keeps the progress area on the main page, just positions it absolutely.


Regards,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Moon
Top achievements
Rank 2
answered on 12 Feb 2013, 01:22 AM
You say:

>>. For more information on the difference you can examine this online demo and this help article.

Yet, there are no hyperlinks to a demo and help article.

I'd like to load a progress area on radwindow load. My loading of the window immediately kicks off the actions I would like to track the progress for, so I'd like them loaded immediately.

thanks.
0
Marin Bratanov
Telerik team
answered on 12 Feb 2013, 11:11 AM
Hi,

I am sorry for missing the links. Here they are:
http://demos.telerik.com/aspnet-ajax/window/examples/contenttemplatevsnavigateurl/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/window-controls-container.html

I have also answered your support ticket with the same question and I am pasting my reply here as well:

On clearing old values - if setting ReloadOnShow to true does not work for you you can use the OnClientClose event of the popup to navigate it to a blank page, e.g.:
function OnClientClose(sender, args) {
   sender.setUrl("about:blank");
}
or to a simple html page that would say "loading" or "please wait".

On showing a custom - progress the initial page load is the first time markup for the page is sent to the client, so there isn't a way to immediately show a custom progress. The progress manager is designed to handler the form submit and then call its handler. If this call happens during the initial load you would simply wait for the process to finish - there will be no markup and scripts loaded in the browser that can show the progress animation. Thus, what you could do is to wait for the page to load on the client and initiate a postback that will trigger the custom progress. This demo shows how to handle custom progress and you can also find attached a simple page that shows the approach.



Kind regards,
Marin Bratanov
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.
Tags
Window
Asked by
Srinivasa
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Moon
Top achievements
Rank 2
Share this question
or