How do you get a custom id to render using HtmlHelper in MVC
Try this:
<%= Html.CheckBox("myCheckbox", "Click here", "True", false, new {_id ="test" })%>
For any keyword you can use an underscore before the name of the attribute. Instead of class you use _class. Since class is a keyword in C#, and also the name of the attribute in HTML. Now, "id" isn't a keyword in C#, but perhaps it is in another .NET language that they want to support. From what I can tell, it's not a keyword in VB.NET, F#, or Ruby so maybe it is a mistake that they force you to use an underscore with it.