I have defined connection alternatives for email and SMS. I want to have email checked by default. I wondered if I can add attribute checked in Razor without changing model or controller. Because if I use plain HTML, then it works but with Razor and when I inspection the page, there is no checked attribute.
@checked = "checked"
@checked = checked
@checked = "true"
@checked = true
new{@checked = "checked"}
<div class="checkbox-wrapper">
<label>
@Html.CheckBoxFor(m => m.Email, new { @class = "form-check-input", id = "E-post", @checked = "checked" })
<label for="E-post">E-post</label>
</label>
</div>
email checkbox checked when the page is loaded