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

AsyncUpload : Uploaded files clickable

4 Answers 76 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Charm
Top achievements
Rank 1
Charm asked on 21 Sep 2012, 06:23 AM
Hi Telerik Team,

Would like to ask some assistance if there's a way to make the uploaded files clickable using the RadAsyncUpload.
E.g 
    I uploaded a file Sample.pdf, when successfully uploaded, i want to click that file and download it.


Thank you in advance.
Charm

4 Answers, 1 is accepted

Sort by
0
Charm
Top achievements
Rank 1
answered on 22 Sep 2012, 08:47 AM
Hello again,

Any feedback with regards to my concern?
Thank you.
0
Plamen
Telerik team
answered on 25 Sep 2012, 03:10 PM
Hi Charm, 

 
One possible way to achieve similar behavior is to use RadButton and the FileUploaded server event of RadAsyncUpload as in the code below:

<telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" MultipleFileSelection="Automatic" TargetFolder = "../../TargetFolderB/"
            OnFileUploaded="AsyncUpload1_FileUploaded">
        </telerik:RadAsyncUpload>
        <telerik:RadButton runat="server" ID="RadButton2" Text="submit">
        </telerik:RadButton>
        <telerik:RadButton runat="server" ID="RadButton1" Visible="false" ButtonType="LinkButton">
        </telerik:RadButton>
protected void AsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
   {
       string targetFolder = AsyncUpload1.TargetFolder;
       string fileName = e.File.GetName();
       RadButton1.Visible = true;
       RadButton1.Text ="DownLoadFile-"+ e.File.GetNameWithoutExtension();
       RadButton1.NavigateUrl = targetFolder + fileName;
       RadButton1.Target = "_blank";
   }

Hope this will be helpful.

All the best,
Plamen
the Telerik team
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 their blog feed now.
0
Charm
Top achievements
Rank 1
answered on 27 Sep 2012, 10:09 AM
Hi Plamen,

Thank you for the response.
I tried your code below but the link button is not displayed when the files are uploaded.
Is there any other workaround with this?
Thanks.
0
Plamen
Telerik team
answered on 02 Oct 2012, 08:56 AM
Hi,

 
I have tested the issue once again and it worked properly at my side once again. Here is a video of my test. If your scenario is somehow different please elaborate it a little bit so we can be more helpful.

Hope this will be helpful you.

All the best,
Plamen
the Telerik team
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 their blog feed now.
Tags
AsyncUpload
Asked by
Charm
Top achievements
Rank 1
Answers by
Charm
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or