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

hiding the asyncupload container and persisting upload

3 Answers 67 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 18 Sep 2013, 02:56 PM

I have a wizard-like screen that has several steps. The first step includes an async-upload. I have set the PostbackTriggers property so that only the submit button on the last step causes the file to be uploaded. This all works fine to persist the file upload through the postbacks associated with the Next/Previous buttons of the wizard, however, the way the wizard works is to hide/show panel controls depending on which step is currently being viewed. If I set the panel.visible property to false for the panel which contains the async-upload, I notice when I return to this step by setting panel.visible to true, the upload is gone. I have found one potential workaround by setting panel.Style("display") = "block" or "none" depending on whether I want to hide it or not and this seems to persist the upload. I would prefer to use the built-in asp.net visible property. I am wondering if this is a known limitation or am I doing something wrong?

3 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 23 Sep 2013, 02:17 PM
Hi Albert,

You cannot use the standard ASP.NET Wizard control for this scenario, because it makes postbacks after every step and the container that holds the RadAsyncUpload will be lost. Better use another control which will allow you to make a client side switching between the steps. For example RadTabStrip can switch between the steps (Tabs). Note that this must happens on the client. This way the RadAsyncUpload will always exist on the page and will be able to persist file uploads. Similar demo could be found here.

Regards,
Hristo Valyavicharski
Telerik
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 the blog feed now.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 23 Sep 2013, 02:35 PM
I am not using the ASP.net Wizard control. And client-side won't work because I need to validate user entries server-side. The example you provided has to do with dynamically-loaded user controls. It doesn't use Ajax (I assume because getting dynamically-loaded user controls to work with Ajax is really hard, and even impossible in some server environments) and it also represents a tremendous amount of over-complication just to present a wizard-like interface. I will see if using a pageview container instead of a panel works any better. If a pageview's visible property is set to false, do you just set it's visible style property to none, or is it not rendered at all like the asp.net panel?

P.S, the wizard example you provided has some bugs having to do with tab enabling and process flow control. You may want to look into that.
0
Hristo Valyavicharski
Telerik team
answered on 26 Sep 2013, 03:31 PM
Hi Albert,

Please find the attached sample.  It demonstrates how to use RadTabStrip as Wizard. Pageviews are used instead of User Controls. Are you looking for something like this? 

Regards,
Hristo Valyavicharski
Telerik
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 the blog feed now.
Tags
AsyncUpload
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Hristo Valyavicharski
Telerik team
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Share this question
or