FileTooLargeMsg alert displays line-break escape codes?

Last post 03-28-2014, 9:07 AM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  03-26-2014, 8:39 PM 80153

    FileTooLargeMsg alert displays line-break escape codes?

    I have the following property set: 

    uploader.FileTooLargeMsg = "{0} cannot be uploaded!\n\nFile size ({1}) is too large. The maximum file size allowed is set to: {2}."

     

    But when the javascript alert is displayed the escape characters (line breaks; \n" are displayed) rather than being interpreted as line breaks.

     

    Also tried using double slashes - no luck ...

     

    Also tried using <br> instead of \n\n - no luck

     

    Any ideas? 

  •  03-27-2014, 8:52 AM 80160 in reply to 80153

    Re: FileTooLargeMsg alert displays line-break escape codes?

    HI bdcoder,

     

    Please try &#13;&#10; 

     

    FileTooLargeMsg="{0} cannot be uploaded!&#13;&#10;File size ({1}) is too large. The maximum file size allowed is set to: {2}."

     

    Regards,

     

    Ken 

  •  03-27-2014, 3:30 PM 80164 in reply to 80160

    Re: FileTooLargeMsg alert displays line-break escape codes?

    Hi Ken,

    No luck the "&#13;&#10" are displayed as is (not interpreted as line breaks).

  •  03-28-2014, 9:07 AM 80171 in reply to 80164

    Re: FileTooLargeMsg alert displays line-break escape codes?

    Hi bdcoder,

     

    Please try the example page below, does it work for you?

     

    1. <%@ Page Language="C#" AutoEventWireup="True" %>  
    2.   
    3. <%@ Register Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" TagPrefix="ajaxuploader" %>  
    4. <html>  
    5.   
    6. <head>  
    7.     
    8. </head>  
    9. <body>  
    10.     <form id="Form1" runat="server">  
    11.         
    12.         <CuteWebUI:UploadAttachments ID="uploader1" runat="server"  FileTooLargeMsg="{0} cannot be uploaded! 
    13.   
    14. File size ({1}) is too large. The maximum file size allowed is set to: {2}." >  
    15.         <ValidateOption MaxSizeKB="1" />  
    16.         </CuteWebUI:UploadAttachments>  
    17.     </form>  
    18. </body>  
    19. </html>  
     

    Regards,

     

    Ken 

View as RSS news feed in XML