We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Cannot figure how to change the text in buttons and labels

Hi,

I have tried the given example for the buttons  in the Page_Load function :
Uploadbox.UploadBoxButtonText = new Syncfusion.JavaScript.Models.UploadboxButtonText() { Browse = "Choose File", Upload = "Upload File", Cancel = "Cancel Upload" };
but it says "Uploadbox does not exists in the current context".
Should I import a specific dll, if yes I could not figure the one needed ? (Using ...)



4 Replies

AL Alain February 9, 2015 03:59 PM UTC

Second problem : it seems files over 30Mo don't work (the control just do not show if such a file is selected), any idea ?


GA Gurunathan A Syncfusion Team February 10, 2015 09:34 AM UTC

Hi Alain,

Thanks for contacting the Syncfusion support.

Query: but it says "Uploadbox does not exists in the current context".
Yes, we should refer the following assemblies and namespace in the project. Please have a look on below table 
Assemblies
Namespace
Syncfusion.EJ & 
Syncfusion.EJ.Web

Syncfusion.JavaScript

Syncfusion.JavaScript.Web

Query: it seems files over 30Mb don't work (the control just do not show if such a file is selected), any idea?

Yes, we have restricted the file to upload in case if it have 31 MB and above. We can reset the maximum file size of upload file by using below work around.

Step 1: Please add the following code snippet in your application, it will reset the maximum file size to upload box control

<Code>

[Script]

<script type="text/javascript">

        $(function () {

          //upload1 is id of uploadbox control

            $("#Upload1").ejUploadbox({ fileSize: 314572800 });

         });

      

       

    </script>

</code>

Step 2: Kindly follow the steps given in below KB document.

https://www.syncfusion.com/kb/2997/how-to-set-upload-file-size-limit-for-an-uploadbox

 

We have prepared a simple sample to depict the scenario of above mentioned queries and it will available in following location:

https://www.syncfusion.com/downloads/support/directtrac/118184/WebApplication1431296791.zip

Please let me know if you have any queries

Thanks,

Gurunathan




AL Alain February 10, 2015 11:45 AM UTC

Hello Mr Gurunathan,

First let me thank you for your responsiveness and efficiency.
I am doing my first steps with Essential studio and I think I am going to love it :-)

1. Concerning UploadBox customization : You are right, I was missing a reference to Syncfusion.EJ library.
For future reference, here is the way I then managed to customize what I needed (in VB.net and french)
In the Page_Load function :
With sfDownloadFile.Model
	.UploadBoxButtonText.Browse = "Sélectionner un fichier"
	.UploadBoxButtonText.Upload = "Télécharger"
	.UploadBoxButtonText.Cancel = "Fermer"
	.UploadBoxDialogText.Title = "Contrôle de téléchargement"
	.UploadBoxDialogText.Name = "Fichier"
	.UploadBoxDialogText.Size = "Taille"
	.UploadBoxDialogText.Status = "Statut"
End With
2. Concerning UploadBox file size limit : your solution works perfectly!
Thanks again.


ES Ezhil S Syncfusion Team February 11, 2015 10:37 AM UTC

Hi Alain,

 

Thanks for the update.

 

We are glad that your issue have been resolved.

 

Kindly get back to us if you require further assistance.

 

Regards,

Ezhil S


Loader.
Live Chat Icon For mobile
Up arrow icon