title: Two way data/event binding w/ non strings (Blazor)
body: <p>Is it possible to two way bind or bind to an event in Blazor w/ non strings?  I have done this with text without an issue but any other type of object is causing me issues.</p>
  
  <p>For example, I have a method that executes when inputting text in a  box which is based on the value inputted as well as several other inputs on the form.</p>
  
  <pre><code>&lt;InputNumber step=".01" class="form-control form-control-xs" @bind-Value="@Salary" @bind-Value:event="onkeydown"/&gt;
  
  private decimal salary {get; set;}
  public decimal Salary
  {
        get
        {
            return salary;
        }
        set
        {
            salary = value;
            CalculationHere();
        }
  }
  </code></pre>
  
  <p>When I do this, I get the below error:</p>
  
  <p><a href="https://i.stack.imgur.com/zjbtc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zjbtc.png" alt="enter image description here"></a></p>
  
  <p>I have also tried passing it in as a parameter like so:</p>
  
  <pre><code>@oninput="@((ChangeEventArgs __e) =&gt; CalculationHere(Convert.ToDecimal(__e.Value)" 
  </code></pre>
  
  <p>This also does not work as it causes an error when the textbox is empty and doesn't fire for all inputs (have tried on keydown as well). There are also a lot of parameters so if possible I'd like to avoid this.</p>
  
  <p>I should also note that when I run this project, set a breakpoint in the method being called, and bind like the below, it DOES work. However, removing the breakpoint stops it from working. This has left me VERY confused.</p>
  
  <pre><code>&lt;InputNumber step=".01" class="form-control form-control-xs" @bind-Value="@Salary" @oninput="(() =&gt; CalculationHere())"/&gt;
  </code></pre>
  
  <p>Is there a best practice regarding this? I'm new to web development and Blazor itself is very new so I'm not sure what the best route to go here is... Any advice? Thanks!</p>