I have a checkbox field in a .cshtml form with next attributes:
@Html.CheckBox("InFooter", new { @class = "form-control", @id = "edit_rssFeed_InFooter" })
Now, using ajax I am setting value to "value" attribute of this checkbox:
$('#edit_rssFeed_InFooter').val(rss.InFooter);
where InFooter is boolean value (true or false). So, with this line, I get value=true/false attribute generated.
I would like to set attribute checked="checked" when attribute value=true. How can I do that?