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

Assigning name to the input element?

Using the Form variation of the uploader control the documentation specifies that the name attribute must be assigned a name but the documentation does not seem to give an example of how to accomplish that.  How do I specifically assign a name to the uploader control?

My Razor code is  @Html.EJS().Uploader("UploadFiles").Uploading("onFileUpload").AutoUpload(false).Render()

1 Reply

NP Narayanasamy Panneer Selvam Syncfusion Team July 29, 2019 02:33 PM UTC

Hi John,

Thanks for contacting us.
 
We have validated your query. By default we have taken id value as name attribute value. But also, We have HtmlAttribute support for our Uploader. So that you can set any html attribute to the Uploader control. 
Note: In our examples of the server side code block we have proceeded with the name attribute. Incase of you are following as like same in documentation. Please do the changes accordingly as per name attribute. 
 
Code example:

 
@{  
Dictionary<string, object> 
htmlAttribute = new Dictionary<string, object>() { 
    {"name", "myFiles" } 
}; 
} 
 
 
@Html.EJS().Uploader("UploadFiles").HtmlAttributes(htmlAttribute).Render() 

Kindly let us know if you need any further assistance on this.
 
 
Regards, 
Narayanasamy P. 


Loader.
Live Chat Icon For mobile
Up arrow icon