title: I am creating an ASP.NET Core 5.0 MVC project. I want to filter the list of products when check the checkBox of Men the than show only men products
body: <p>How can I filter the product list when product checkBox true l_ModUDFItem is the list of the products and in this code products are show with input check box.</p>
  <p>I want to filter the product when I check the men group.</p>
  <pre class="lang-html prettyprint-override"><code>&lt;div class=&quot;single-widget category&quot;&gt;
      &lt;h3 class=&quot;title&quot;&gt;@Model.l_ModUDF.Where(x =&gt; x.UDFType == &quot;String&quot;).FirstOrDefault().UDFID&lt;/h3&gt;
      &lt;ul&gt;
          @foreach (var item in Model.l_ModUDFItem.GroupBy(x =&gt; x.Category))
          {
              l_ModUDFItem = item.Where(x =&gt; x.Category == item.Key).First() ;
              &lt;li&gt;
                  &lt;input type=&quot;checkbox&quot;
                         name=&quot;model&quot;
                         value=&quot;&quot; 
                         onclick=&quot;Categories(@l_ModUDFItem.Category)&quot;/&gt;
                  @item.Key
              &lt;/li&gt;
          }
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>