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

File Upload problem with Rad Ajax Manager

2 Answers 240 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Jessie
Top achievements
Rank 1
Jessie asked on 01 Oct 2009, 03:07 AM

Hi, 

I'm using RadUpload to upload the photo. 

After I selected the photo and click the Upload Button, I want to refresh the image in DataList only and I don't want the whole page doing the postback. Therefore, I'm using RadAjaxManager.  

Besides, I'm using RadAjaxManager to control the Rad Tab Strip and Rad Multi Page to avoid the whole page doing the postback. I just want the Rad Page View be refresh only and not the whole page doing postback.

The problem is when I select the photo and click Upload button, the uplPhoto.UploadedFiles.Count become 0.

The upload function failed when I added the Rad Ajax Manager.
 
If I didnt use Rad Ajax Manager, the upload function is no problem but the whole page will be refresh.

<telerik:RadTabStrip ID="rtsPhoto" runat="server" MultiPageID="rmpPhoto"   
      ontabclick="rtsPhoto_TabClick">  
   <Tabs> 
     <telerik:RadTab Text="Image" runat="server"   Selected="true">  
     </telerik:RadTab> 
     <telerik:RadTab Text="Upload" runat="server" PageViewID="rpvUpload">  
     </telerik:RadTab> 
   </Tabs> 
</telerik:RadTabStrip> 
 
 
 
<telerik:RadMultiPage ID="rmpPhoto" runat="server">  
 
     <telerik:RadPageView ID="rpvUpload" runat="server">  
 
          <telerik:RadUpload ID="uplPhoto" runat="server" ControlObjectsVisibility="None" MaxFileInputsCount="1" Width="300px"   
                allowedfileextensions=".jpg,.jpeg,.gif,.png,.bmp">  
          </telerik:RadUpload> 
 
          <asp:Button ID="btnUpload" runat="server" Text="Upload" CssClass="black_button"   
                style="width:70px;" onclick="btnUpload_Click" /> 
                                      
          <asp:DataList ID="dtlPhoto" runat="server" DataSourceID="odsPhoto">  
                <ItemTemplate> 
                     <img id="imgPhoto" alt="" src='<%# Eval("ThumbnailLocation") %>' /> 
                </ItemTemplate> 
          </asp:DataList> 
 
     </telerik:RadPageView> 
                            
</telerik:RadMultiPage> 
 
 
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="rtsPhoto">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rtsPhoto" /> 
                    <telerik:AjaxUpdatedControl ControlID="rmpPhoto" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
</telerik:RadAjaxManager> 
 

Anyone can help?

Thanks.

Regards,
Jessie

2 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 01 Oct 2009, 09:33 AM
Hi Jessie,

Please refer to this help article for details on the matter.

Sincerely yours,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jessie
Top achievements
Rank 1
answered on 02 Oct 2009, 01:37 AM
Hi Paul,

Thanks for your information.

According to the article, RadUpload cannot upload files using AJAX calls.
In order to upload a file,  it must perform a full page postback.

So, I just use 1 of the approaches (Workaround for RadAjaxPanel or RadAjaxManager) to solve my problem.

Thanks.

Regards,
Jessie
Tags
Upload (Obsolete)
Asked by
Jessie
Top achievements
Rank 1
Answers by
Paul
Telerik team
Jessie
Top achievements
Rank 1
Share this question
or