title: How to control checkbox Situation in List View asp.net C#
body: <p>I'm control check box checked or not in GridView like in the below</p>
  
  <pre><code>foreach (GridViewRow row in GridView2.Rows)
              {
                  CheckBox cb = (CheckBox)row.FindControl("CheckBox1");
  
                  if (cb.Checked == true)
                  {
                      if (cb != null &amp;&amp; cb.Checked)
                      {
                             //Some Stuf..
  
                      }
                  }
                }
  </code></pre>
  
  <p>But i can't find the way how to control check box in list view Because Listview doesn't have extension "Row" like in the grid view could you help me about it? </p>
  
  <p>My listview code written in the below</p>
  
  <pre><code>&lt;asp:ListView ID="ListView2" runat="server"&gt;
  
               &lt;LayoutTemplate&gt;
              &lt;ul&gt;
                  &lt;asp:PlaceHolder ID="itemPlaceholder" runat="server" /&gt;
              &lt;/ul&gt;
          &lt;/LayoutTemplate&gt;
          &lt;ItemTemplate&gt;
              &lt;li&gt;
                           &lt;asp:CheckBox ID="CheckBox1" runat="server" /&gt;
                          &lt;b&gt;City: &lt;/b&gt;&lt;span class="city"&gt;&lt;%# Eval("eeee") %&gt;&lt;/span&gt;&lt;br /&gt;
                          &lt;b&gt;Postal Code: &lt;/b&gt;&lt;span class="postal"&gt;&lt;%# Eval("dddd") %&gt;&lt;/span&gt;&lt;br /&gt;
                          &lt;b&gt;Country: &lt;/b&gt;&lt;span class="country"&gt;&lt;%# Eval("cccc")%&gt;&lt;/span&gt;&lt;br /&gt;
                          &lt;b&gt;Phone: &lt;/b&gt;&lt;span class="phone"&gt;&lt;%# Eval("bbbb")%&gt;&lt;/span&gt;&lt;br /&gt;
                          &lt;b&gt;Fax: &lt;/b&gt;&lt;span class="fax"&gt;&lt;%# Eval("aaaa")%&gt;&lt;/span&gt;&lt;br /&gt;
              &lt;/li&gt;
  
  
          &lt;/ItemTemplate&gt;
  
              &lt;LayoutTemplate&gt;
                  &lt;div id="itemPlaceholderContainer" runat="server" style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;
                      &lt;span runat="server" id="itemPlaceholder" /&gt;
                  &lt;/div&gt;
                  &lt;div style="text-align: center;background-color: #FFCC66;font-family: Verdana, Arial, Helvetica, sans-serif;color: #333333;"&gt;
                      &lt;asp:DataPager ID="DataPager1" runat="server"&gt;
                          &lt;Fields&gt;
                              &lt;asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" /&gt;
                              &lt;asp:NumericPagerField /&gt;
                              &lt;asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" /&gt;
                          &lt;/Fields&gt;
                      &lt;/asp:DataPager&gt;
                  &lt;/div&gt;
              &lt;/LayoutTemplate&gt;
  
          &lt;EmptyDataTemplate&gt;
              Sonuç Bulunamadı
          &lt;/EmptyDataTemplate&gt;
  
          &lt;/asp:ListView&gt;
  </code></pre>
  
  <p>Thank you</p>