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

One RadWindow with RadAsyncupload for three buttons

1 Answer 39 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
: Arumuga Vignesh
Top achievements
Rank 1
: Arumuga Vignesh asked on 01 Aug 2013, 04:07 PM

Hi,

I have three rad windows having RadAsynUpload functionality, for three buttons

Can I have one RadWindow having RadAsyncUpload but it should be accessible to all the three buttons
and the file path and file name should be returned to manipulate that file?

Pls help

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 06 Aug 2013, 01:30 PM
Hi Arumuga,

Yes it is possible to access RadAsyncUpload from everywhere on the page. For example:
ASPX:
<telerik:RadButton ID="RadButton1" runat="server" Text="Show Window 1" OnClientClicked="OnClientClicked1" AutoPostBack="false"></telerik:RadButton>
   <telerik:RadButton ID="RadButton2" runat="server" Text="Show Window 2" OnClientClicked="OnClientClicked2" AutoPostBack="false"></telerik:RadButton>
   <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
   <telerik:RadWindow ID="RadWindow1" runat="server" >
       <ContentTemplate>
           <h2>RadWindow1</h2>
           <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server"></telerik:RadAsyncUpload>
       </ContentTemplate>
   </telerik:RadWindow>
   <telerik:RadWindow ID="RadWindow2" runat="server">
       <ContentTemplate>
           <h2>RadWindow1</h2>
       </ContentTemplate>
   </telerik:RadWindow>

JavaScript:
function OnClientClicked1(sender, args) {
    var window1 = $find('RadWindow1');
    window1.show();
}
 
function OnClientClicked2(sender, args) {
    var window1 = $find('RadWindow2');
    var id = $('.RadAsyncUpload').attr('id');
    var upload = $find(id);
    window1.show();
}

The file name will be accessible on both client and server-side, but the file path can be taken and modified only from the server. For security reasons browsers don't not allow to read it.


Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
General Discussions
Asked by
: Arumuga Vignesh
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or