Disabled button working in my View page using jquery
- by kumar
<% 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?