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

RadAsyncUpload not Asyncronous

5 Answers 122 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jaime Weise
Top achievements
Rank 1
Jaime Weise asked on 12 May 2011, 02:00 AM
We are Building a Simple Widget
The widget has a designer. The designer has a RadAsyncUpload control. The upload control has a handler for the OnClientFileUploaded event. The event fires when the files selection is complete. The files doesn't upload until I click a button on the designer. The file is only uploaded after the pages is refreshed(posted back). 

Of course the button doesn't post back asynchronously.

5 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 12 May 2011, 05:52 PM
Hello,

RadAsyncUpload offers asynchronous upload capability while maintaining the look of the regular RadUpload control.The upload process requires that the files are uploaded to a custom handler and not to the hosting page. Files are stored in a temporary location until a postback occurs.
Please check your project for the following folders "~/App_Data/RadUploadTemp/, the files are stored there(with unique names) after they are uploaded. After a postback occurs the files are moved to a target folder if the TargetFolder property is set.

Best wishes,
Peter Filipov
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
Jaime Weise
Top achievements
Rank 1
answered on 12 May 2011, 06:38 PM
Hi thanks that's fine, 

Then, how can I create a postback from the designer class so I don't have to have an and upload, a submit button, and the regular dialog save button (image link)?

Ideally, I could just click save and the postback would happen. 
0
Peter Filipov
Telerik team
answered on 13 May 2011, 12:39 PM
Hi jwize,

Please clarify what do you mean by "designer".

If you want to trigger a postback when is clicked somewhere you can use javascript. Here is a sample code:
<form id="form1" runat="server">
      <a href="javascript: submitform()">Search</a>
</form>
 
<script type="text/javascript">
function submitform() {
    theForm.submit();
}
</script>


All the best,
Peter Filipov
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
Jaime Weise
Top achievements
Rank 1
answered on 13 May 2011, 06:03 PM
The Designer refers to a control that inherits from ControlDesignerBase 
Go to pages and edit a page and click on the edit button of any widget.

When you click on the edit button of the widget in the page content edit mode the designer is shown. That is what I am referring to as designer. The designer is where you set properties for the widget at design time. There is a save button and a cancel link at the bottom as well as an advanced tab.

The save button doesn't post back. 

It would be appropriate if the dialog could postback and then close. I guess the onclose event should be handled and somehow the post would signal for the dialog to be closed once posted back. 

That is just a stab at what I might need to do. Or I could somehow save the temp file on the server to the correct place. 
0
Peter Filipov
Telerik team
answered on 18 May 2011, 05:00 PM
Hi Jaime Weise,

Thank you for contacting us.

Unfortunately it is not possible to handle dialog "closing" event or trigger a postback from the dialog due to security reasons.
Please consult with the following demo how to use a custom handler to save a file directly.

I hope this helps. Please let me know if I can assist you further.

Kind regards,
Peter Filipov
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
AsyncUpload
Asked by
Jaime Weise
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Jaime Weise
Top achievements
Rank 1
Share this question
or