trying to disable two html.Textboxfor field on condition.Not working .Looks like syntax issue.
$(document).ready(function() {
if (Model.Key == Guid.Empty) {
$("#@idPasswordTextBox").attr('disabled', 'disabled');
$("#@idConfirmPasswordTextBox").attr('disabled', 'disabled');
}
});
Is that a way to use if condition inside $(document).ready(function() {}?
Try wrapping your razor code in ( )
should escape the javascript string