Skip to content
Advertisement

How do you enable Dropzone options? autoDiscover breaks Dropzone functionality

So, I tried following the solution here:

Dropzone image upload options not working 🙁

but, whenever I provide the option:

JavaScript

the dropzone goes from displaying the default drag’n’drop look to just text with a “Browse” button.

Here is my code (dropzone is included in header):

JavaScript

So, the question is, how do I specify options for dropzone without ruining the default look?

Advertisement

Answer

I figured it out myself. I’m fairly new to ASP.NET Web Forms and forgot that Javascript is client-side and therefore references element IDs which are different on the client-side than server-side. I viewed the source and found that the form’s ID is “aspnetForm”, so I changed my options code to:

JavaScript

etc.

Now it works!

Advertisement