Razor how to create a CheckBox and make it READONLY?

Should be something like this:

@Html.CheckBoxFor(m => m.IsPublished, new { @disabled = "disabled" })

UPDATE:

Assuming that your class AdvSlot contains a property IsPublished you can write in your loop:

<td>
    @Html.CheckBox(item.AdvSlotId + "_IsPublished", item.IsPublished, new { @disabled = "disabled" });
</td> 

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)