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

ValidatingFile not firing under ajax control

3 Answers 52 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 24 Aug 2010, 04:53 PM
I have a asp.net page built using radtabstrips, radmultipage and pageviews. I use an RadAjaxManager for updating my controls. I would like to place a radupload control on one of my pages, but I can not get the control to fire the validatingfile event when I upload the file. I have tried going into the ajax manager and setting the upload control as both the initiatior and the handled control, but this does not work.

If I move the control to the very bottom of the page where it is outside of all other controls, the event fires. It stops working anytime I place it inside of a multipage. Even if I wrap this in a panel and use the ajax manager to hide and show the panel, the upload quits working here also.

Any ideas on how to get this control to work inside of the page?

3 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 24 Aug 2010, 05:31 PM
Hello Philip,

You have to turn off Ajax when uploading a file. Refer to this demo:

http://demos.telerik.com/aspnet-ajax/ajax/examples/common/fileupload/defaultcs.aspx

It shows how it should be handled.

I hope that helps.
0
Philip
Top achievements
Rank 1
answered on 24 Aug 2010, 06:26 PM
Thanks for the quick reply, but I need a little more help.

I added the following to the head of my page:

function

 

OnRequestStart(target, arguments) {

 

     

if (arguments.get_eventTarget() == "Button5") {

 

            arguments.set_enableAjax(

false);  

 

    }

 

}

 

 


Where Button5 is the initiating button for the callback. But it still isnt working. What am I missing here.

<

 

asp:Panel ID="Panel2" runat="server" Visible="false">

 

<div id="moduploadformat" style="width: 800px;">

 

<telerik:RadUpload ID="Radtest" runat="server" TargetFolder="~/Uploads" >

 

</telerik:RadUpload>

 

<asp:Button ID="Button5" runat="server" Text="Button" />

 

</div>

 

</asp:Panel>

 

 

0
Cori
Top achievements
Rank 2
answered on 25 Aug 2010, 02:23 PM
Hello Philip,

You need to change the line

arguments.get_eventTarget() == "Button5" 

to this

arguments.get_eventTarget().indexOf("Button5") != -1

I hope that helps.
Tags
Upload (Obsolete)
Asked by
Philip
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Philip
Top achievements
Rank 1
Share this question
or