RadAsyncUpload add image to button

7 posts, 1 answers
  1. S
    S avatar
    20 posts
    Member since:
    Nov 2014

    Posted 23 Jun 2015 Link to this post

    I have a RadAsyncUpload , i just want to show an image on this button.Itried using

    #AsyncUpload1 .ruButton
    {         
       /*it is an example URL*/ 
       background-image: url("../Images/eClose.png");
    }  

    but no luck.

     

    <telerik:RadAsyncUpload ID="AsyncUpload1" Width="5px" runat="server" Localization-Remove=""   HideFileInput="true" Skin="Office2010Silver" OnClientFileUploaded="AsyncUpload1_OnClientFileUploaded"
                        MaxFileSize="10485760" OnFileUploaded="AsyncUpload1_FileUploaded" MultipleFileSelection="Disabled" OnClientValidationFailed="validationFailed"
                        AutoAddFileInputs="false" UploadedFilesRendering="BelowFileInput">
                        <Localization Select="Attach"  />
                    </telerik:RadAsyncUpload>

     

    Please help

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    281 posts

    Posted 23 Jun 2015 Link to this post

    Hi,

    You may try the following approach:

    <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" RenderMode="Classic">
        <Localization Select="" />
    </telerik:RadAsyncUpload>

    Setting the Select value to an empty string would hide the text of the image. Another approach would be to try displacing the text as described in the following StackOverflow thread.

    Then use the image attached to this post and add the following CSS:

    <style type="text/css">
        html .RadUpload .ruButton {
            height: 26px;
            width: 78px;
            background-image: url(add.jpg);
        }
     
            html .RadUpload .ruButton.ruButtonFocus,
            html .RadUpload .ruButton.ruButtonFocus.ruButtonHover {
                background-position: -1px, -1px;
            }
    </style>

    As a result, you should have a custom image applied to your RadAsyncUpload.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. S
    S avatar
    20 posts
    Member since:
    Nov 2014

    Posted 24 Jun 2015 in reply to Dimitar Link to this post

    Hi , 

    Thanks , that worked.

  5. S
    S avatar
    20 posts
    Member since:
    Nov 2014

    Posted 24 Jun 2015 Link to this post

    Hi Dimitar,

    can you please help with this below issue?

     I have a usercontrol for attachments. The usercontrol has a RadAsyncUpload and a grid to show the uploaded files.But when i use this usercontrol on my main page, and upload a file, it displays the first uploaded file immediately in the grid in usercontrol.But when i upload second time , the file gets uploaded but the UI is not refreshed and the second file is not shown in the grid.Please help.I have added ajax setting to update the usercontrol on my main page on click of the RadAsyncUpload button.  <telerik:AjaxSetting AjaxControlID="AsyncUpload1">
                    <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="usrAttachments" />
                 
                    </UpdatedControls>
                </telerik:AjaxSetting>

  6. S
    S avatar
    20 posts
    Member since:
    Nov 2014

    Posted 26 Jun 2015 in reply to Dimitar Link to this post

    this is not working on server when i add this style in css file..please help
  7. S
    S avatar
    20 posts
    Member since:
    Nov 2014

    Posted 26 Jun 2015 in reply to Dimitar Link to this post

    this is working in chrome not on IE ON server.

    this is not working on server when i add this style in css file..please help

  8. Dimitar
    Admin
    Dimitar avatar
    281 posts

    Posted 30 Jun 2015 Link to this post

    Hi,

    The CSS I provided previously works in both IE and Chrome on my side, when placed in a separate CSS file.

    If the CSS is working in Chrome, but not in IE, when placed in a separate CSS file, you may have hit the IE CSS files limit of 32 individual files allowed. Note that the style tag in the HTML head section is also counted as a CSS file. The issue can be fixed by placing a RadStyleSheetManager control on your page. You may refer to the Internet Explorer CSS Limits blog post for further information about the issue and how to overcome it.

    And about the other issue mentioned about refreshing UI in RadGrid, is this issue still reproducible? If you are still facing it, I would suggest you to open a separate forum thread for it. This would help us keep threads as short and consistent as possible, which would result in better issues handling. Thank you in advance for your understanding.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017