asp.net - server side code not executing after returning true on jquery -


i trying upload files using upload file control asp.net.

now wired button click on jquery , return true if passes validation.

here jquery code:

$("#button1").click(function () {   var empty = checkempty();   if (!empty) {     var accepttype = determintype();     if (accepttype) {       var acceptsize = determinesize();       if (acceptsize) {         alert('im here');         return true;       } else {         $.ambiance({           message: "file big check mugshot size size should not exceed 100kb!",           title: "file type restriction!",           type: "error",           timeout: 10,           fade: true         });         return false;       }     } else {       $.ambiance({         message: "file type restricted jpeg!",         title: "file type restriction!",         type: "error",         timeout: 10,         fade: true       });       return false;     }   } else {     $.ambiance({       message: "please choose mugshots upload!",       title: "empty queue!",       type: "error",       timeout: 10,       fade: true     });      return false;   } }); 

at condition test acceptsize variable trying return true execute server side code save folder inside development machine.

i have tried setting clientidmode="static" still no luck

the alert here showing , returning true server side code not executing

am lacking something?

thank you

here html part


    <div class="control-group">      <label class="control-label" for="typeahead">whole body</label>        <div class="controls">             <asp:fileupload id="whole" runat="server" />        </div>     </div>     <div class="control-group">      <label class="control-label" for="typeahead">front</label>         <div class="controls">             <asp:fileupload id="front" runat="server" />         </div>     </div>     <div class="control-group">       <label class="control-label" for="typeahead">left face</label>        <div class="controls">             <asp:fileupload id="left" runat="server" />        </div>     </div>    <div class="control-group">      <label class="control-label" for="typeahead">right face</label>        <div class="controls">             <asp:fileupload id="right" runat="server" />        </div>    </div>     <div class="form-actions">                                                                               <asp:button id="button1" cssclass="btn-primary btn-large" runat="server"           text="start upload" />    </div> 


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

android - Go back to previous fragment -