Thanx M, and I mean that, but I really need this to work
without a postback and frankly it should behave like the
other controls are behaving (correctly). This smells like
a bug to me and I just wanted to get some sort of
confirmation from the field or refutation with some sort
of an explaination. Can you reproduce the problem? I have
found a way around it for now by encasing the checkboxes
in an <asp:Table> then disabling/enabling the table
instead, which thankfully works. Thanx again M.
>-----Original Message-----
>hi Tracey
>
>try seting 'AutoPostBack' property for the controls to
true and then try
>again. your code will look somethnig like this
>
><form id="frmTest" method="post" runat="server">
>
><asp:CheckBox ID="chkTest" Runat="server" Enabled="False"
Text="chkTest"
>AutoPostBack="True"></asp:CheckBox>
>
><asp:TextBox ID="txtTest" Runat="server" Enabled="False"
>>txtTest</asp:TextBox>
>
><asp:CheckBox ID="chkTryIt" Runat="server" Enabled="True"
Text="chkTryIt"
>AutoPostBack="True"></asp:CheckBox>
>
></form>
>
>M
>
>"Tracey" <traceydenomy@hotmail.com> wrote in message
>news:00f301c35133$d6f1ab10$a001280a@phx.gbl...
>> I have found that the <asp:checkbox> control is not
>> respecting the disabled attribute while the
<asp:textbox>
>> and other controls are respecting it. Does anybody know
if
>> this is a known bug and if so, what it's number is? Can
>> anybody else reproduce this problem? I've included some
>> simple code below. Here is the Form:
>>
>> <form id="frmTest" method="post" runat="server">
>>
>> <asp:CheckBox ID="chkTest" Runat="server"
Enabled="False"
>> Text="chkTest"></asp:CheckBox>
>>
>> <asp:TextBox ID="txtTest" Runat="server"
>> Enabled="False">txtTest</asp:TextBox>
>>
>> <asp:CheckBox ID="chkTryIt" Runat="server"
Enabled="True"
>> Text="chkTryIt"></asp:CheckBox>
>>
>> </form>
>>
>> And here is some client side script used to flip flop
>> between enabled and disabled. Notice how the textbox
>> respects the disabled attribute, but for some reason the
>> checkbox doesn't?
>>
>> Sub chkTryIt_OnClick
>>
>> document.getElementById("chkTest").disabled = _
>> (document.getElementById("chkTryIt").checked = False)
>>
>> document.getElementById("chkTest").checked = _
>> (document.getElementById("chkTryIt").checked = True)
>>
>> document.getElementById("txtTest").disabled = _
>> (document.getElementById("chkTryIt").checked = False)
>>
>> End Sub
>>
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
>Version: 6.0.502 / Virus Database: 300 - Release Date:
7/18/2003
>
>
>.
>