hiding the asyncupload container and persisting upload

4 posts, 0 answers
  1. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 18 Sep 2013 Link to this post


    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?
  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 23 Sep 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 23 Sep 2013 Link to this post

    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.
  5. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 26 Sep 2013 Link to this post

    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.
Back to Top