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

Need an Example of RadUpload in a RadAjaxPanel using MasterPage

6 Answers 187 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
neebs
Top achievements
Rank 2
neebs asked on 25 Sep 2008, 11:18 PM
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

6 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 29 Sep 2008, 11:55 AM
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.
0
Steve Napurano
Top achievements
Rank 1
answered on 11 May 2011, 02:45 AM
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
0
Steve Napurano
Top achievements
Rank 1
answered on 11 May 2011, 02:56 AM
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>

 

0
Steve Napurano
Top achievements
Rank 1
answered on 12 May 2011, 05:17 AM
Hi any news on this issue?

Thanks

Steve
0
Maria Ilieva
Telerik team
answered on 13 May 2011, 01:47 PM
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.

0
Maria Ilieva
Telerik team
answered on 13 May 2011, 01:47 PM
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.

Tags
Ajax
Asked by
neebs
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Steve Napurano
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or