Anjani Kumar Agrawal Anjani Kumar Agrawal - 7 months ago 33
C# Question

Disable on Parent Span Not Disabling Child Checkbox in Chrome

So I have C# code that disables a checkbox:


This adds a new Span parent with disabled attribute to the chkbox.

<span disabled="disabled">
<input id="ctl00_DataContentHolder_chkbox" type="checkbox" name="ctl00$DataContentHolder$chkbox" checked="checked">

The checkbox is now disabled in IE but not in Chrome. How do I disable it in Chrome by modifying my C# code?


Try this:

   chkbox.Enabled = false;