troubleshooting Question

asp.net webform with dropZone

Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America asked on
JavaScriptC#UI/UX
2 Comments1 Solution29 ViewsLast Modified:
I have the code below UI with DropZone.
When submitbutton is clicked. I want to do the following.

  • Validate extension to jpg and gif only
  • Upload to directory c:\temp\

How can do that in Javascript?


function submit()
{
???
}


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Mvc4Application_Basic.WebForm1" %>

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script src="https://raw.github.com/enyo/dropzone/master/downloads/dropzone.js"></script>
        <link href="http://www.dropzonejs.com/css/general.css?v=7" rel="stylesheet" />
    </head>
    <body>
        <form id="frmMain" runat="server" class="dropzone">
            <div>
                <div class="fallback">
                    <input name="file" type="file" multiple />
                     <a id="submitbutton" name="submitbutton"   class="button special" onclick="submit()">Submit Now</a>  
                    <a>
                </div>
            </div>
        </form>
    </body>
    </html>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros