Am no ASP.NET expert by far, but this one is indeed easy. This
behaviour is by design:

Form controls that are disabled do not participate in the Form post...
IOW, their values are not submitted to the server. This is the reason
why you only see the default value, regardless of the changes you make
at the client end. You should review the reasons why you wish to
disable the checkbox at the client end and yet obtain its checked
value.at the server.

On Jul 6, 7:20 pm, gizmo <[email protected]> wrote:
> Hi,
>
> I have a webpage with a asp:checkbox control.
>
> I enable/disable the control through javascript.
>
> When checkbox is disabled I interrogate the checkbox.checked value in
> codebehind and it shows as checked=false even when the checkbox is
> actually checked.
>
> As a test I removed the checkbox disabling code in javascript and
> again interrogated the checked value.  This time it showed up
> correctly.
>
> Has anyone come across this before?  Is this normal behaviour?  What
> do i need to to get get the correct checked value of the disabled
> checkbox?
>
> Your help is much appreciated.
>
> Regards
> Gavin

Reply via email to