The following piece of code is not disabling the html button. I am using MVC3 razor . Can anyone point out where I am going wrong
@{
bool disablebutton = bool.Parse(ViewData["Disablebutton"].ToString());
}
$(document).ready(function () {
if (@disablebutton) {
$('#abc').attr('disabled', 'disabled');
}
});