readonly CheckBox or CheckBoxList

Simply add the following to your declaration:
onclick=”return false;” 

This will disable the javascript that ticks / unticks the box.

Examples of both readonly CheckBoxLists and readonly CheckBoxListes in ASP.Net:

<asp:CheckBoxList ID=”CheckBoxList1″ runat=”server” onclick=”return false;”>
<asp:CheckBox ID=”CheckBox1″ runat=”server” onclick=”return false;” Text=”test” />

Or straight forward in simple HTML:

<input type="CheckBox" onclick="return false;" > Cant tick me</input>
<input type="CheckBox" onclick="return false;" checked="checked" > or untick me</input>
Cant tick me or untick me

What's your thoughts on this?


Protected by WP Anti Spam