title: ASP.Net Custom Checkbox property checked
body: <p>so recently I started a C# Asp.Net quiz for one of my school projects, but I ran into the following problem:</p>
  
  <p>My index.aspx site:</p>
  
  <pre><code>   &lt;form runat="server" class="ac-custom ac-checkbox ac-boxfill" autocomplete="off" onload="Page_Load"&gt;
  
        &lt;asp:CheckBox ID="q1a1" runat="server" Text="example answer" onclick="changeState(this);" /&gt;
  
     &lt;/form&gt;
  </code></pre>
  
  <p>I applied to the checkbox the onClick event which fires (I tested it out) the     </p>
  
  <pre><code>changeState()
  </code></pre>
  
  <p>event. But so far, nothing is happening to one of the properties when I try to change it.</p>
  
  <p>So, for the custom checkbox I use this:
  (I hope it is okay, that I post a link reference to it. Either way, I'll do it.</p>
  
  <p><a href="http://tympanus.net/codrops/2013/10/15/animated-checkboxes-and-radio-buttons-with-svg/" rel="nofollow">Reference for the custom animated Checkboxes</a></p>
  
  <p>So, when I click the checkbox, the custom style applies to it, but the checked property doesn't change at all. So I started experiment a bit around with Javascript, but came to no solution.</p>
  
  <p>The javascript I use:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function changeState(caller) {
          if (document.getElementById(caller.id).checked)
          {
              document.getElementById(caller.id).checked = false;
          }
          else
          {
              document.getElementById(caller.id).checked = true;
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Also I read somewhere, that you can use a thing like:</p>
  
  <pre><code>document.getElementById(caller.id).click();
  </code></pre>
  
  <p>to change the checkstate. But both of these things doesn't helped me.
  Maybe you guys can give me some hope, pretty sure it can be a simple solution. But I'n open for all tips or changes.</p>