Setting CancelButtonStyle has no effect

Last post 02-05-2016, 2:49 PM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  02-04-2016, 4:40 PM 82381

    Setting CancelButtonStyle has no effect

    Setting the CancelButtonStyle has no effect whether done in the markup or code-behind. When the button is rendered to the page, it does include the correct id. I am using version 4.0 2015-12-29. This worked correctly in version 3.0.

     

    Markup:

    <div id="UploadContainer" style="width:290px">

    <CuteWebUI:UploadAttachments ID="Attachments1" runat="server" 

    InsertButtonID="UploadPhotos" QueuePanelID="UploadContainer" ProgressCtrlID="UploadContainer"

    ShowFileIcons="true" ShowCheckBoxes="false"

    ShowActionButtons="false" ShowRemoveButtons="false"

    ShowProgressInfo="false" MultipleFilesUpload="true"

    ProgressPanelWidth="250" ProgressLabelStyle-Width="200"

    AttachmentTRStyle="Width:0px" NumFilesShowCancelAll="9999"

    OnAttachmentAdded="Attachments1_AttachmentAdded"

    CancelUploadMsg="Cancel" CancelButtonStyle-CssClass="inputbutton"

    >

    <HeaderRowStyle Width="0px" />

    <ValidateOption AllowedFileExtensions="jpeg,jpg,gif,png" MaxSizeKB="5120" />

    </CuteWebUI:UploadAttachments>

    </div>

     

    Rendered content:

    <div id="UploadContainer" style="width: 290px; display: none;">
       <style>...</style>
    <input name="ctl00$Body$Attachments1" id="ctl00_Body_Attachments1" type="hidden" value="" autocomplete="off" IsUploaderField="1"><span style="display: none;"></span>

    <button style="display: none;">Cancel</button>

    <img id="ctl00_Body_Attachments1Image_unique" style="display: none;" onerror="this.onload()" onload="this.style.display=&quot;none&quot; ; if(window.CuteWebUI_AjaxUploader_Initialize){window.CuteWebUI_AjaxUploader_Initialize(this.id)}else{var imgid=this.id;var xh=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHttp');xh.open('GET','/fullauction/CuteWebUI_Uploader_Resource.axd?type=script&amp;_ver=635899698420000000',true);xh.onreadystatechange=function(){if(xh.readyState==4){eval(xh.responseText);CuteWebUI_AjaxUploader_Initialize(imgid);}};xh.send('');}" src="/fullauction/CuteWebUI_Uploader_Resource.axd?type=file&amp;file=continuous.gif" resourcehandler="/fullauction/CuteWebUI_Uploader_Resource.axd" serverlang="AspNet" contextvalue="Fr!3lvP0C0IUpF2THIuRj!1rMIDrm4YNcifofyb!1VDBmqk2qAc3wsxn2idku1nEi4yeqtg8SuQYkKSsYqj2kQXWWqvAziBOH8iQexNJgtEQWs!2" inputboxcsstext="" inserttext="Upload multiple files" extensions="jpeg,jpg,gif,png" maxsizekb="5120" queuepanelid="UploadContainer" progressctrlid="UploadContainer" progresstextid="ctl00_Body_Attachments1__ProgressText" cancelbuttonid="ctl00_Body_Attachments1__Cancel"  insertbuttonid="UploadPhotos" postbackeventreference="__doPostBack('ctl00$Body$Attachments1','')" border barstyle="Continuous" infostyle="padding-left:3px;font:normal 12px Tahoma;" barheight="20" panelwidth="250" showprogressbar="1" showqueuetable="1" numfilesshowcancelall="9999" multiplefilesupload="1" uploadcursor="Auto" uploadtype="Auto" advancedoptionnosilverlight="true" uploadaddonbuttonmode="Auto" uploadingmsg="Uploading.." cancelallmsg="Cancel all Uploads" canceluploadmsg="Cancel" windowsdialoglimitmsg="Unable to select so many files at once. The total file name length cannot exceed 32kb." maxfileslimitmsg="The maximum number of files allowed to be uploaded is set to {0}." filetoolargemsg="{0} cannot be uploaded!&#10;&#10;File size ({1}) is too large. The maximum file size allowed is set to: {2}." verticks="635899698420000000" root="/fullauction/" namespace="CuteWebUI" uniqueid="ctl00$Body$Attachments1">
      </div> 

  •  02-05-2016, 8:47 AM 82389 in reply to 82381

    Re: Setting CancelButtonStyle has no effect

    Hi,

     

    I just tried it with version 4.0, it works fine. can you try the example page below? does it work?

     

    1. <%@ Page Language="c#" %>  
    2.   
    3. <%@ Register Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" TagPrefix="CuteWebUI" %>  
    4. <html>  
    5. <head>  
    6.     <style>  
    7.         .redColor {  
    8.             background-color: blue;  
    9.         }  
    10.     </style>  
    11. </head>  
    12. <body>  
    13.     <form id="Form1" method="post" runat="server">  
    14.         <CuteWebUI:UploadAttachments ID="uploader1" runat="server" CancelButtonStyle-CssClass="redColor"></CuteWebUI:UploadAttachments>  
    15.     </form>  
    16. </body>  
    17. </html>  
     

    Regards,

     

    Ken 

  •  02-05-2016, 2:16 PM 82390 in reply to 82389

    Re: Setting CancelButtonStyle has no effect

     Yes, that works, but this does not:

     

    <%@ Page Language="c#" %>

    <%@ Register Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" TagPrefix="CuteWebUI" %>

    <html>

    <head>

    <style>

    .redColor {

    background-color: blue;

    }

    </style>

    </head>

    <body>

    <form id="Form1" method="post" runat="server">

    <CuteWebUI:UploadAttachments ID="uploader1" runat="server"

    ProgressCtrlID="progress"

    CancelButtonStyle-CssClass="redColor"></CuteWebUI:UploadAttachments>

    <div id="progress">

    Progress bar follows

    </div>

    </form>

    </body>

    </html>

     

  •  02-05-2016, 2:49 PM 82391 in reply to 82390

    Re: Setting CancelButtonStyle has no effect

    Hi,

     

    with this requirement, I suggest you use the custom cancel button, like the example below. so you can apply the style for the custom button directly.

     

    1. <%@ Page Language="c#" %>  
    2.   
    3. <%@ Register Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" TagPrefix="CuteWebUI" %>  
    4. <html>  
    5. <head>  
    6.     <style>  
    7.         .redColor {  
    8.             background-color: blue;  
    9.         }  
    10.     </style>  
    11. </head>  
    12. <body>  
    13.     <form id="Form1" method="post" runat="server">  
    14.         <CuteWebUI:UploadAttachments ID="uploader1" runat="server"  
    15.             ProgressCtrlID="progress" CancelButtonID="btnCancel">  
    16.         </CuteWebUI:UploadAttachments>  
    17.         <asp:Button ID="btnCancel" runat="server" Text="my cancel button" CssClass="redColor" />  
    18.         <div id="progress">  
    19.             Progress bar follows  
    20.         </div>  
    21.     </form>  
    22. </body>  
    23. </html>  
     

    Regards,

     

    Ken 

View as RSS news feed in XML