title: check box checked state getting wrong in ASP.NET
body: <p>My ASP.NET application has two Check-boxes. I want to checked a check-box another check-box checked on condition.The condition is if another check-box is not checked than only is checked otherwise not. For that i have to check that checked state.And this is doing by <code>**$(chkmanual).is(":checked")**</code></p>
  
  <p>Code snipet given below:</p>
  
  <pre><code>function UpdateCheck() {
    var chkmanual = $("[id*=chkManual]");
    alert($(chkmanual).is(":checked")); //here i getting always true. 
    if (!$(chkmanual).is(":checked"))
    {                 
       chkmanual.click();
    }
  }
  </code></pre>
  
  <p>My check box like:</p>
  
  <pre><code>&lt;asp:DataList ID="dgDeviceList" runat="server"&gt;
    &lt;HeaderTemplate&gt;
       &lt;table cellpadding="5" cellspacing="5" width="100%"&gt;
          &lt;/HeaderTemplate&gt;
             &lt;ItemTemplate&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                &lt;ajaxToolkit:ToggleButtonExtender ID="ToggleExManual" runat="server" TargetControlID="chkManual" CheckedImageAlternateText="Check" UncheckedImageAlternateText="UnCheck" UncheckedImageUrl="~/images/empty.png"
  CheckedImageUrl="images/checkbox.png" ImageWidth="30" ImageHeight="30" DisabledCheckedImageUrl="~/images/DisableCheckbox.png"                                           DisabledUncheckedImageUrl="~/images/DisableEmpty.png" /&gt;
                &lt;ajaxToolkit:ToggleButtonExtender ID="ToggleExPatientOwned" runat="server" TargetControlID="chkPatientOwned" CheckedImageAlternateText="Check" UncheckedImageAlternateText="UnCheck" UncheckedImageUrl="~/images/empty.png"
   CheckedImageUrl="images/checkbox.png" ImageWidth="30" ImageHeight="30" DisabledCheckedImageUrl="~/images/DisableCheckbox.png"DisabledUncheckedImageUrl="~/images/DisableEmpty.png" /&gt;
      &lt;asp:CheckBox ID="chkManual" runat="server" Text="Manual" Width="100px" CssClass="chkPosition" Enabled="false" /&gt;
      &lt;asp:CheckBox ID="chkPatientOwned" runat="server" Text="Patient Owned" Width="130px" onclick="javascript:UpdateCheck();" CssClass="chkPosition" Enabled="false" /&gt;
                &lt;/td&gt;
              &lt;/tr&gt;
             &lt;/ItemTemplate&gt;
            &lt;FooterTemplate&gt;
           &lt;/table&gt;
         &lt;/FooterTemplate&gt;
  &lt;/asp:DataList&gt;
  </code></pre>