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

AsyncUpload in UserControl

5 Answers 152 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Curt
Top achievements
Rank 1
Curt asked on 24 Jun 2011, 08:10 PM
Im trying to setup a AsyncUpload in a UserControl based on the example here .The upload adds a file to the RadUploadTemp folder but never refreshes the image and does not add the image to the permanent folder. Any help would be great.

~Curt 

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TEST.ascx.cs" Inherits="Controls_TEST" %>
<telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Thumbnail" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<script type="text/javascript">
    function fileUploaded(sender, args) {
        $find('RadAjaxManager1').ajaxRequest();
        $telerik.$(".invalid").html("");
        sender.deleteFileInputAt(0);
    }
    function validationFailed(sender, args) {
        $telerik.$(".invalid")
                .html("Invalid extension, please choose an image file");
        sender.deleteFileInputAt(0);
    }
</script>
<div class="upload-panel">
    <telerik:RadBinaryImage runat="server" Width="200px" Height="150px" ResizeMode="Fit"
        ID="Thumbnail" ImageUrl="~/Images/1.jpg" AlternateText="Thumbnail" CssClass="binary-image" />
    <span class="invalid"></span>
    <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" MaxFileInputsCount="1" AllowedFileExtensions="jpeg,jpg,gif,png,bmp"
        TargetFolder="~/Images" TemporaryFolder="~/Images/RadUploadTemp" TemporaryFileExpiration="00:00:05">
        <Localization Select="Choose Avatar" />
    </telerik:RadAsyncUpload>
</div>

5 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 29 Jun 2011, 04:21 PM
Hello Curt,

Please find attached a sample project for the below scenario.

Hope it helps.

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.

0
Curt
Top achievements
Rank 1
answered on 26 Jul 2011, 08:55 PM
I have got the example working, but my problem seems to be that the example uses an ajaxmanager on the user control rather that ajaxamanagerproxy. By moving the ajaxmanager to this individual control all of my other controls on the page quit working correctly. Is there any to use the asycupload calling the ajaxmanager on the content page? or any other workarounds for this problem?

Thanks
Curt Wheeler
0
Peter Filipov
Telerik team
answered on 27 Jul 2011, 01:41 PM
Hi Curt,

Please review the following help articles - RadAjax and WebUserControls and RadAjax and MasterPage.

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.

0
Curt
Top achievements
Rank 1
answered on 28 Jul 2011, 01:11 AM
Thanks for the quick reply, but just a reference to the help pages doesn't answer my question at all.
I've read through the ajax help as well as other forum posts and it is unclear if this will work with the asycn upload or if there are any examples of how to do it. 
0
Peter Filipov
Telerik team
answered on 28 Jul 2011, 01:38 PM
Hello Curt,

Please find attached a sample project with user control and RadAjaxManager control on the parent page.

Hope it helps.

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.

Tags
AsyncUpload
Asked by
Curt
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Curt
Top achievements
Rank 1
Share this question
or