Disabled Attribute Not Working
For some reason none of these DIVs render disabled. Oddly enough, when I set Enabled='False' on the .NET Panel, then it renders the Panel as a DIV with disabled='disabled', which
Solution 1:
Disabled is not an attribute for a DIV, but an attribute for every form element (like INPUT, SELECT, TEXTAREA).
Just add the disabled attribute to ever form element within the DIV.
Solution 2:
I guess the disabled="disabled"
gets parsed server side and applies that status to children fields (runat="server"
), because in html there's no disabled="disabled"
for <div>
elements.
Solution 3:
You basically want to use CSS display: none
here.
<divstyle="display: none;">
A <div>
is a simple HTML element and get printed to HTTP response as-is, it's not some server side component which generates some HTML (like as those other ASP.NET components are doing).
Post a Comment for "Disabled Attribute Not Working"