title: ASP.NET Core Dynamic Hiding and Showing Onchange
body: <p>I'm new to ASP.NET Core and I'm trying to figure out the simplest way to hide/show elements based on field value changes. For instance if I have the following:</p>
  
  <pre><code>&lt;select id="SelectDiv"&gt;
      &lt;option value=""&gt;-- choose --&lt;/option&gt;
      &lt;option value="Div1"&gt;Show Div1&lt;/option&gt;
      &lt;option value="Div2"&gt;Show Div2&lt;/option&gt;
  &lt;/select&gt;
  &lt;div id="DivContainer"&gt;
      &lt;div id="Div1" class="hidden"&gt;I'm Div1!&lt;/div&gt;
      &lt;div id="Div2" class="hidden"&gt;I'm Div2!&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and I select "Show Div1", I want to "refresh" the <code>DivContainer</code> and update the style classes based on the selection in <code>SelectDiv</code> dropdown.</p>
  
  <p>Is this logic done server side or client side? The data will be bound to a model if that changes the way to approach this. I will need to do many of these types of operations throughout my app and I'm just trying to figure out the best way to structure things.</p>