Avatar of ITsolutionWizard
ITsolutionWizard
Flag for United States of America asked on

asp.net webform with dropZone

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>

Open in new window

UI/UXJavaScriptC#

Avatar of undefined
Last Comment
leakim971

8/22/2022 - Mon
ITsolutionWizard

ASKER
anyone can help?
ASKER CERTIFIED SOLUTION
leakim971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23