Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
8920
WebUpload
posted

Web.zipI am working on the module that does upload data, without storing file on the server, in the WebForm environment utilizing WebUpload control. In general it is working..

Have several questions:
1.I am getting texts on the buttons as following : after load I see "Upload File" then "Upload" and after it done - "Add" .... How do I change text on them ?

2. I added <div id="uploadErrors" style="color: red;"></div> and <AllowedExtensions>, when I am trying to add file with wrong extension it does not show upload button but it does not show error message in red either.. How to make message visible

3. How to make Clear Upload button visible.


4. In the document on the site there is following example adding server events :

<system.web>
<pages>
<add tagPrefix="igjq" namespace="Infragistics.Web.UI.EditorControls"
assembly="Infragistics.Web.jQuery"/>
</pages>
</system.web>
<igjq:WebUpload ID="webUpload1" runat="server"
OnUploadFinishing="webUpload1_OnUploadFinishing"
OnUploadFinished="webUpload1_OnUploadFinished"
OnUploadStarting="webUpload1_OnUploadStarting">
</igjq:WebUpload>

On the other hand I just added protected void WebUpload1_UploadFinishing(object sender, Infragistics.Web.UI.EditorControls.UploadFinishingEventArgs e) and it is working, what is the difference ?


Files added for references, please show fixes in FileUpload01when possible...

Parents
No Data
Reply
  • 1300
    Offline posted

    Hello Michael,

    After investigating this further, I determined that the labels of the buttons could be customized by using the Locales-LabelUploadButton, Locales-LabelAddButton and Locales-LabelSummaryProgressButtonContinue properties of the WebUpload:

    <ig:WebUpload ID="WebUpload1" runat="server . . . Locales-LabelUploadButton="myUpload" Locales-LabelAddButton="myAdd" Locales-LabelSummaryProgressButtonContinue="myUploadStart">

    The clear button could be displayed by setting the mode of the WebUpload to multiple. Additionally if the WebUpload should allow only one image, MaxUploadedFiles property could be set to 1.

    Regarding your second requirement, a method could be bound to the onError client side event, where the innerHtml of the div could be set to the error message. The method would look as follows:

    var div = document.getElementById("uploadErrors");

    function error(sender, args) {

        div.innerHTML = args.errorMessage;

    }

    In regards to the WebUpload events our sample implements handlers for both OnUploadStarting, OnUploadFinishing and OnUploadFinished. They are implemented for the purposes of this particular sample, however it is not necessary to always include them in order to have your WebUpload control working. In case that you need one or more of them the essential part is to have them included in the tag for the web upload and to have handlers on the server side. By default, handler names are created as following: ControlID_EventName. For example: webUpload1_OnUploadFinishing However, if you would like to change this name you can assign any name of your choice, as I believe is the case with WebUpload1_UploadFinishing.

    Below I am attaching a sample, demonstrating customizing the labels. Please test it on your side and let me know if you need any further information regarding this matter.

    Regards,
    Monika Kirkova,
    Infragistics

    WebUploadSaveFile.zip

Children