title: How to call action from checkbox input using tag helpers
body: <p>If I want to call controller action using input of type image I can do it like:</p>
  
  <pre><code>&lt;form method="post"&gt;
      &lt;button asp-controller="Home" asp-action="Index"&gt;Click Me&lt;/button&gt;
      &lt;input type="image" src="..." alt="Or Click Me" asp-controller="Home" 
                                  asp-action="Index"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>Is it possible to do something similar with input of type checkbox using tag helpers like this:</strong></p>
  
  <pre><code>&lt;input type="checkbox" asp-for="@Model.Property" asp-controller="Home" asp-action="DoSomething" asp-route-propertyId="@Model.Id" class="form-control" /&gt;
  </code></pre>
  
  <p>? Or if I must write own custom tag helper for this?</p>
  
  <p>Code below also does not work.</p>
  
  <pre><code>&lt;input type="checkbox" asp-for="@Model.Property" onclick="@Url.Action("DoSomething", "Home", new { propertyId= Model.Id })" class="form-control" /&gt;
  </code></pre>
  
  <p>Edit:
  Currentyly I found solution as follow:</p>
  
  <pre><code>&lt;input type="checkbox" asp-for="@Model.Property" onclick="triggerLink(@Model.Property)" class="form-control" /&gt;
  </code></pre>
  
  <p>than I add following script:</p>
  
  <pre><code>function triggerLink(Property) {
      var theUrl = '@Url.Action("DoSomething", "Home")?propertyId=' + Property;
      window.location = theUrl;
  }
  </code></pre>
  
  <p>It's working but I am still looking for a solution with tag helpers.</p>