Disabled button working in my View page using jquery

Posted by kumar on Stack Overflow See other posts from Stack Overflow or by kumar
Published on 2010-06-06T22:07:05Z Indexed on 2010/06/06 22:12 UTC
Read the original article Hit count: 187

Filed under:
<% using (Html.BeginForm("Student", "Home", FormMethod.Post, new { @id = "exc-"})) 
   { %>

this is my Beginform and I have buttons in my view..

<fieldset>
    <div> 
       <input id="btnSelectAll" type="button" class="button" value="Select All" />
       <input id="btnSubmit" type="submit" class="button" value="Save" />
       <input id="btnCancel" type="button" class="button" value="Cancel" />
    </div>
</fieldset>

On document load I am doing disabling my submit button

  $('#btnSubmit').attr('disabled','disabled');
        $('#btnCancel').attr('disabled','disabled');

I am seeing My buttons are Disabled but when I click on Save button still its going to my controler?

please can anybody tell me why its doing like this?

© Stack Overflow or respective owner

Related posts about jQuery