Need an Example of RadUpload in a RadAjaxPanel using MasterPage

7 posts, 0 answers
  1. neebs
    neebs avatar
    106 posts
    Member since:
    Apr 2007

    Posted 25 Sep 2008 Link to this post

    Hi,

    I have a Master Page implemented form, with a RadAjaxPanel and RadAjaxLoadingPanel defined in the Master Page. On the Web Form, I have a RadUpload, and an button to initiate the upload. I've seen a number of examples on doing uploads using various combinations of these, but not all three as described above. Is there an example of how to do this?

    I had this working using AjaxPanel, and you simply added the control to the Trigger collection as a postback trigger. I'm looking for something analagous to this.

    Steve
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 29 Sep 2008 Link to this post

    Hello neebs,

    To see more information along the lines of the requested functionality, please refer to the following example.
    Review the code, and see how it meets your requirements.

    All the best,
    Yavor
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Steve Napurano
    Steve Napurano avatar
    40 posts
    Member since:
    Aug 2009

    Posted 10 May 2011 Link to this post

    HI, I followed that example and read this post but I get the error attached.

     

    function conditionalPostback(e, sender)

     

     

    {

     

     

    var theYearbookRegexp = new RegExp("\.btnUploadPhoto$|\.btnUploadPhoto$", "ig");

     

     

     

    var theLockerRegexp = new RegExp("\.uploadLockerPic$|\.uploadLockerPic$", "ig");

     

     

     

    if (sender.get_eventTarget().match(theYearbookRegexp))

     

     

    {

     

     

    var upload = $find(window['radUpload']);

     

     

     

    //AJAX is disabled only if file is selected for upload

     

     

    if(upload.getFileInputs()[0].value != "")

     

     

    {

     

    sender.set_enableAjax(

    false);

     

     

    }

     

    }

     

     

    if (sender.get_eventTarget().match(theLockerRegexp)) {

     

     

     

    var upload = $find(window['radUpload']);

     

     

     

    //AJAX is disabled only if file is selected for upload

     

     

    if (upload.getFileInputs()[0].value != "") {

     

     

    sender.set_enableAjax(

    false);

     

     

    }

     

    }

     

    }



    <

     

    telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" clientevents-onrequeststart="conditionalPostback">

     



    I checked my uploads, those are the correct names
  5. Steve Napurano
    Steve Napurano avatar
    40 posts
    Member since:
    Aug 2009

    Posted 10 May 2011 Link to this post

    also, I enclosed it in a RadScriptBlock and changed name to MY upload names

    var upload = $find(window['rbUpload']);


    ------------------------------------------------------------------------------

    <

     

    script type="text/javascript">

     

    <telerik:radscriptblock id=

    "RadScriptBlock1" runat="server">

     

     

     

    function conditionalPostback(e, sender)

     

     

    {

     

     

    var theYearbookRegexp = new RegExp("\.btnUploadPhoto$|\.btnUploadPhoto$", "ig");

     

     

     

    var theLockerRegexp = new RegExp("\.uploadLockerPic$|\.uploadLockerPic$", "ig");

     

     

     

    if (sender.get_eventTarget().match(theYearbookRegexp))

     

     

    {

     

     

    var upload = $find(window['rbUpload']);

     

     

     

    //AJAX is disabled only if file is selected for upload

     

     

    if(upload.getFileInputs()[0].value != "")

     

     

    {

     

    sender.set_enableAjax(

    false);

     

     

    }

     

    }

     

     

    if (sender.get_eventTarget().match(theLockerRegexp)) {

     

     

     

    var upload = $find(window['uploadLockerPic']);

     

     

     

    //AJAX is disabled only if file is selected for upload

     

     

    if (upload.getFileInputs()[0].value != "") {

     

     

    sender.set_enableAjax(

    false);

     

     

    }

     

    }

     

    }

     

    </telerik:radscriptblock>

     

     

    </script>

     

  6. Steve Napurano
    Steve Napurano avatar
    40 posts
    Member since:
    Aug 2009

    Posted 12 May 2011 Link to this post

    Hi any news on this issue?

    Thanks

    Steve
  7. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 13 May 2011 Link to this post

    Hi Steve,

    The provided code does not give enough information for the error you are facing and what exactly is causing it.  Could i kindly ask you to open a regular support ticket and send us runnable version of your application. Thus we will be able to debug it locally and isolate the root cause of the issue you are facing.

    Kind regards,
    Maria Ilieva
    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.

  8. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 13 May 2011 Link to this post

    Hi Steve,

    The provided code does not give enough information for the error you are facing and what exactly is causing it.  Could i kindly ask you to open a regular support ticket and send us runnable version of your application. Thus we will be able to debug it locally and isolate the root cause of the issue you are facing.

    Kind regards,
    Maria Ilieva
    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.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017