Re: During upload is in progress i need to change text of InserButton to "Uploading...."

  •  03-11-2013, 12:20 PM

    Re: During upload is in progress i need to change text of InserButton to "Uploading...."

    Hi krajiv23,

     

    Please try the example page below, it shows you how to achieve this requirement. I use a button as the uploader button by property "InsertButtonID". And changed the text of this button when uploading and upload complete.

     

    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>  
    4. <!DOCTYPE html>  
    5.   
    6. <script runat="server">  
    7.     protected void uploader1_UploadCompleted(object sender, UploaderEventArgs[] args)  
    8.     {  
    9.         //change the upload button text after uploaded  
    10.         btnUpload.Text = "Upload Completed";  
    11.     }  
    12. </script>  
    13.   
    14. <html xmlns="http://www.w3.org/1999/xhtml">  
    15. <head runat="server">  
    16.     <title>Untitled Page</title>  
    17. </head>  
    18. <body>  
    19.     <form id="form1" runat="server">  
    20.         <div>  
    21.             <CuteWebUI:Uploader runat="server" ID="uploader1" InsertButtonID="btnUpload" OnUploadCompleted="uploader1_UploadCompleted">  
    22.             </CuteWebUI:Uploader>  
    23.             <asp:Button ID="btnUpload" runat="server" Text="select file" />  
    24.         </div>  
    25.     </form>  
    26. </body>  
    27. </html>  
    28. <script type="text/javascript">  
    29.     function CuteWebUI_AjaxUploader_OnStart() {  
    30.         var btnUpload = document.getElementById("<%= btnUpload.ClientID%>");  
    31.         //change the upload button text when uploading  
    32.         btnUpload.value = "Uploading......";  
    33.     }  
    34. </script>  
     

    Regards,

     

    Ken 

     

     

     

View Complete Thread