title: How to hide buttons and show them when clicking another button in c# and ASP.NET Core?
body: <p>I have a problem: how can I hide some buttons and make them visible when another button is clicked? I am using Blazor and ASP.NET Core, and I have seen several examples but they are in Javascript and jQuery but not in C#.</p>
  <p>This is the button that will execute the event to show the buttons:</p>
  <pre><code>&lt;button class=&quot;btn btn-dark&quot; @onclick=&quot;GuardarCotizacion&quot;&gt;&lt;i class=&quot;fa fa-floppy-o&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt; Guardar Cotización&lt;/button&gt;
  </code></pre>
  <p>These are the buttons that I want to have hidden are inside a dropdown:</p>
  <pre><code>&lt;div class=&quot;box-footer&quot;&gt;
      &lt;div class=&quot;pull-right&quot;&gt;
          &lt;div class=&quot;btn-group&quot;&gt;
              &lt;div class=&quot;btn-group&quot;&gt;
                  &lt;div class=&quot;dropdown&quot;&gt;
                      &lt;button class=&quot;btn btn-info dropdown-toggle&quot; type=&quot;button&quot; id=&quot;dropdownMenu1&quot; data-toggle=&quot;dropdown&quot; aria-haspopup=&quot;true&quot; aria-expanded=&quot;false&quot;&gt;Correo&lt;/button&gt;
                      &lt;div class=&quot;dropdown-menu&quot; aria-labelledby=&quot;dropdownMenu1&quot;&gt;
                          &lt;button class=&quot;dropdown-item&quot; type=&quot;button&quot; @onclick=&quot;@DescargarPDF&quot;&gt;&lt;i class=&quot;oi oi-envelope-closed&quot;&gt;&lt;/i&gt; Descargar Cotización&lt;/button&gt;
                          &lt;button class=&quot;dropdown-item&quot; type=&quot;button&quot;&gt;&lt;i class=&quot;oi oi-eye&quot;&gt;&lt;/i&gt; Ver Correo&lt;/button&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;button type=&quot;button&quot; class=&quot;btn btn-outline-info&quot; @onclick=&quot;@AgregarProducto&quot;&gt;&lt;i class='fa fa-plus'&gt;&lt;/i&gt; Agregar productos&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;                              
  
      &lt;div class=&quot;btn-group&quot;&gt;
          &lt;div class=&quot;btn-group&quot;&gt;
              &lt;div class=&quot;dropdown&quot;&gt;
                  &lt;button class=&quot;btn btn-primary dropdown-toggle&quot; type=&quot;button&quot; id=&quot;dropdownMenu2&quot; data-toggle=&quot;dropdown&quot; aria-haspopup=&quot;true&quot; aria-expanded=&quot;false&quot;&gt;Facturación&lt;/button&gt;
                  &lt;div class=&quot;dropdown-menu&quot; aria-labelledby=&quot;dropdownMenu2&quot;&gt;
                  @if (isFacturado)
                  {
                      &lt;button class=&quot;dropdown-item&quot; type=&quot;button&quot;&gt;&lt;i class=&quot;oi oi-eye&quot;&gt;&lt;/i&gt; Ver Factura&lt;/button&gt;
                  }
                  else
                  {
                      &lt;button class=&quot;dropdown-item&quot; type=&quot;button&quot; @onclick=&quot;FacturarDemo&quot;&gt;&lt;i class=&quot;oi oi-file&quot;&gt;&lt;/i&gt; FacturarDemo&lt;/button&gt;
                      &lt;button class=&quot;dropdown-item&quot; type=&quot;button&quot;&gt;&lt;i class=&quot;oi oi-file&quot;&gt;&lt;/i&gt; ---- &lt;/button&gt;
                      &lt;button class=&quot;dropdown-item&quot; type=&quot;button&quot; @onclick=&quot;Facturar&quot;&gt;&lt;i class=&quot;oi oi-file&quot;&gt;&lt;/i&gt; Facturar&lt;/button&gt;
                  }
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;a class=&quot;btn btn-outline-primary&quot; href=&quot;detalles-carritos&quot;&gt;&lt;i class=&quot;oi oi-eye&quot;&gt;&lt;/i&gt; Ver Artículos&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>