I've been reading up on stackoverflow about checkboxes and setting their value to 1 to make them checked, but it doesn't seem to work in my case. I have a databinder eval expression that evaluates to 1 when my checkbox should be checkeed, and I've verified the generated page has at least one input checkbox with value=1 that is not displaying as checked.
What am I missing? I tried just setting the checked property, but even checked=' ' counts as checked, so I couldn't see anyway to make that work for both checked and unchecked checkboxes.
Here is the html that doesn't seem to work.
<input type='checkbox' class="datacell" id='603'
style='text-align: center' value='1' />
Here's the databinders that I have set up in my repeater for the main input elements
<input type='<%# Eval("InputType") %>' class="datacell"
id='<%# Eval("CellID") %>' style='<%# Eval("InputAlign") %>'
value='<%# Eval("TestResult") %>' />
The other evals just make sure the right cells are checkboxes, and that the alignment of cells works a certain way (checkboxes aligned center, numeric stuff aligned right and other stuff aligned left.)
Edit: So how can do that with a Databinding Expression, that's my dilemma.