title: Selecting items of a Listview using checkboxes in ASP .NET
body: <p>I am trying to use checkboxes to select the items in a Listview. I have added a checkbox control in the , and they are displayed properly.</p>
  
  <p>The problem is that Checked property never changes when I click on them. Why does this happen? And is there a workaround?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;asp:ListView ID="ListView1" runat="server" 
      onitemcommand="ListView1_ItemCommand" 
      onitemdatabound="ListView1_ItemDataBound"&gt;
      &lt;LayoutTemplate&gt;
          &lt;asp:PlaceHolder ID="itemPlaceholder" runat="server" /&gt;
      &lt;/LayoutTemplate&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:CheckBox ID="CheckBoxSelect" runat="server" OnCheckedChanged="CheckBoxSelect_checkchanged"/&gt;            
          &lt;asp:LinkButton ID="LinkButtonOpen" CommandArgument='&lt;%#Eval("MessageID") %&gt;' runat="server"&gt;            
              &amp;nbsp; &amp;nbsp; &amp;nbsp;
              &lt;asp:Label ID="Label1" Text="[]" runat="server"/&gt;
              &amp;nbsp; &amp;nbsp; &amp;nbsp;
              &lt;%#Eval("FirstName" )%&gt;&amp;nbsp;&lt;%#Eval("LastName")%&gt;
              &amp;nbsp; &amp;nbsp; &amp;nbsp;
              &lt;%#Eval("Subject") %&gt;
              &amp;nbsp; &amp;nbsp; &amp;nbsp;
              &lt;%#Eval("Timestamp") %&gt;
              &lt;asp:HiddenField runat="server" ID="ReadStatus" Value='&lt;%#Eval("IsRead") %&gt;' /&gt;
          &lt;/asp:LinkButton&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:ListView&gt;
  </code></pre>