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

RadUpload inside a UserControl wrapped inside a updatepanel

6 Answers 268 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Jeeva
Top achievements
Rank 1
Jeeva asked on 29 Oct 2008, 04:09 PM

Hi,
I have a situation where i have RadUpload inside a UserControl and the usercontrol is wrapped inside an update panel on the aspx page. The aspx page needs the update panel so that it can render different user controls based on a radMenu selection.

In the Usercontrol -> for Radupload I have setup automatic file saving to a TargetFolder, also the button on the page generates full postback, still the image is not getting saved. There is no update panel in the usercontrol, but on the aspx page.

Can you suggest why this could be happening ? Your help is much appreciated.

Thanks,
Jeeva

6 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 02 Nov 2008, 12:52 PM
Hi Jeeva,

The problem happens, because files cannot be uploaded via Ajax calls. This is because of limitations of the XmlHttpRequest object and the browser. I suggest that you create a postback trigger for the button, which is used to upload the file.

Kind regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jeeva
Top achievements
Rank 1
answered on 05 Nov 2008, 05:11 PM
Thanks Erjan..
I did try my best, i think my issue is little different from the issues i saw across the forum. I would appreciate if you can give me some pointers for the following scenario.

1. I have 1 aspx page and a bunch of user controls.
2. A rad menu on the aspx page is used to choose an option based on which one of the user control is loaded into an update panel on the ASPX page.
3. This update panel has a "asp:Placeholder" control which for which i  unwire and rewire the user controls.
4. Now when i have the user control where i have a radUpload in it, is loaded on to the page asynchronously, i am unable to set the postback for the button inside that control.



My ASPX looks like this..

    <div style="float:left;width:auto; border:solid 1px red;margin-right:5px;"  
        id="leftPanel"
        <telerik:RadMenu ID="InfoCenterMenu" runat="server" Flow="Vertical" Skin="Default"  
        style="top: 0px; left: 0px; width:auto; z-index:10000"
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
        <Items> 
            <telerik:RadMenuItem runat="server" Text="SignUp"
            </telerik:RadMenuItem> 
            <telerik:RadMenuItem runat="server" Text="My Profile"
            </telerik:RadMenuItem> 
            <telerik:RadMenuItem runat="server" Text="My Posts"
            </telerik:RadMenuItem> 
        </Items> 
    </telerik:RadMenu> 
   </div> 
   <div style="float:left;width:620px; border:solid 1px blue;margin-right:5px;"  
        id="centerPanel"
        <asp:UpdatePanel  ID="SettingControlUpdatePanel" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional" EnableViewState="true"
            <ContentTemplate > 
                <asp:PlaceHolder ID="ControlContainerPlaceHolder" runat="server" />     
            </ContentTemplate> 
            <Triggers> 
                <asp:AsyncPostBackTrigger ControlID="InfoCenterMenu" EventName="ItemClick" /> 
            </Triggers> 
        </asp:UpdatePanel>  
   </div> 
 


My User Control :

<div id="conDiv" style="float:left;border:0px solid green; width:460px;margin-left:5px;"
    <table style="width: 100%;"
        <tr style="margin-top:5px;"
            <td align="right"
                <asp:Label ID="lbl_Name" runat="server" Text="Display Name :"></asp:Label> 
            </td> 
            <td align="center"
                <span style="font-size:10px;"><telerik:RadTextBox ID="DisplayName" 
                Runat="server" Skin="WebBlue" Width="230px"
            </telerik:RadTextBox> 
                <br /> 
            </span> 
            </td> 
        </tr> 
        <tr style="margin-top:5px;"
            <td align="right"
                <asp:Label ID="lbl_email" runat="server" Text="Email :"></asp:Label> 
            </td> 
            <td align="center"
                <span style="font-size:10px;"><telerik:RadTextBox ID="EmailText" 
                Runat="server" Skin="WebBlue" Width="230px"
            </telerik:RadTextBox> 
            </span> 
            </td> 
        </tr> 
        <tr style="margin-top:5px;"
            <td align="right"
                <asp:Label ID="lbl_Image" runat="server" Text="Profile Image :"></asp:Label> 
            </td> 
            <td align="center"
                <telerik:RadUpload ID="ProfileImageUpload" Runat="server" 
                AllowedFileExtensions=".jpg,.jpeg" ControlObjectsVisibility="None" 
                Skin="Gray" Width="241px" InputSize="34" 
                    TargetFolder="~/Images/Members" Enabled="True"
                </telerik:RadUpload> 
            </td> 
        </tr> 
        <tr style="margin-top:10px;"
            <td align="center" colspan="2"
                <asp:Button ID="SignUpSubmit" runat="server" Text="SignUp" /> 
            </td> 
        </tr> 
    </table> 
</div> 


Now i've to make this radupload have a postback on click of SignupSubmit.

Any suggestions.. i guess i'm missing something coz i did try the suggestions on this board.

Regards,
Jeeva




0
Susan
Top achievements
Rank 1
answered on 05 Aug 2011, 06:25 PM
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
FIX THE LINK!!!!!!!!!!!!!!!!
0
Peter Filipov
Telerik team
answered on 10 Aug 2011, 03:12 PM
Hi Susan,

The link below is fixed. Here is the correct link.

Greetings,
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
Sravan
Top achievements
Rank 1
answered on 19 Aug 2011, 04:34 PM
The Link Is Not Working...
0
Peter Filipov
Telerik team
answered on 24 Aug 2011, 08:01 AM
Hello Sravan,

The link is working correct on side. Please try it again.

Regards,
Peter Filipov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Upload (Obsolete)
Asked by
Jeeva
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Jeeva
Top achievements
Rank 1
Susan
Top achievements
Rank 1
Sravan
Top achievements
Rank 1
Share this question
or