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

set upload file image of RadAsyncUpload from code behind

3 Answers 159 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vinayak
Top achievements
Rank 1
Vinayak asked on 12 Sep 2013, 06:45 AM
Hi,

I want to set upload file image of RadAsyncUpload (Please see screenshot)
 from code behind?
How can we achieve this?

3 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 16 Sep 2013, 03:49 PM
Hi Vinayak,

Please clarify what exactly are you trying to achieve:

* Do you want to place border around the uploaded file?
* Do you want to generate a thumb of the uploaded file (if applicable)?
* Do you need to put an icon in front of the file based on the file type?
* Do you want to pre-set the name of the file to be uploaded from code behind?

All but the last are possible due to browser security restrictions.

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.
0
Vinayak
Top achievements
Rank 1
answered on 17 Sep 2013, 10:23 AM
I want icon beside uploaded filename (a green one), And remove image to be set from code behind.
0
Hristo Valyavicharski
Telerik team
answered on 18 Sep 2013, 04:37 PM
Hi,

The default green and red icons are loaded from the assembly as an embedded resource and are applied as background image to the selected files. It is possible to change this background image, so you can include your icons. However there is no easy way to apply the new image from code-behind. You should use CSS:
<style type="text/css">
    html .RadUpload .ruUploadSuccess, .RadUpload .ruUploadFailure, .RadUpload .ruUploadCancelled {
        background-image: url("img/back.jpg");
    }
</style>
Sample project is attached.

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
Vinayak
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Vinayak
Top achievements
Rank 1
Share this question
or