There are lots of problems with that code. For one thing, although HTML5 allows just about any character in an id other than a space, earlier versions of HTML were more restrictive and CSS still is, so you really don't want to start an id with a #. (You can avoid using an id entirely in this case, unless you need the id for code you haven't quoted.) Your input type has a typo ("checbox") and so it won't be a checkbox, it'll default to "text".
Here's my best guess at what you want:
iHtml = "<label title='ToolTipText'>" +
"<input id='x<%” + column + ".ClientID%>' type='checkbox' name='x<%” +column+".ClientID%>'/>" +
" MyCheckBox</label>";
...but I'm not at all sure your ASP.Net aspects in there are right (I've left it as you had it), looks dodgy to me but I don't do a lot of ASP.Net. (Not least the fancy ” character.)
What I did above:
- Make the
id and name start with an x and got rid of the #. See the links above for why. (I left the id because I wasn't sure you didn't need it; if you don't need it, if the name is enough, you can remove it.)
- Put the
input inside the label. When you do that, you can avoid the whole for thing.
- Put the
title on the label, no need for an extra span.
- Corrected the
type.
- Put the text of all attributes in single quotes. This is largely stylistic, at least in HTML (quoting attriutes is not stylistic in XHTML, it's required).