title: How to add onchange to Html.EditorFor?
body: <p>I have second thing in my page:</p>
  
  <pre><code>&lt;tbody&gt;
    @for (int i = 0; i &lt; Model.Options.Count; i++)
    {
      ...
      ...
  
      &lt;tr&gt;
          &lt;td&gt;
              @Html.EditorFor(m =&gt; Model.Option[i].Date, new {id = Model.Option[i].OptionId})
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;
              @Html.EditorFor(m =&gt; Model.Options[i].Completed, new {id = Model.Option[i].OptionId})
          &lt;/td&gt;
      &lt;/tr&gt;
  
      ...
      ...
    }
  &lt;/tbody&gt;
  </code></pre>
  
  <p>I need to add onchange event for Completed.
  I tried to do this in this way:</p>
  
  <pre><code>new { id = Model.Option[i].OptionId, onchange = "StateChange()"}
  </code></pre>
  
  <p>and creating function StateChange() <strong>but the problem is</strong> that onchange was not added to my EdditorFor. As a result, no reaction on javascript function at all.</p>
  
  <p>I tried second thing in my BoolYesNo.cshtml (Editor templates):</p>
  
  <pre><code>@model bool?
  
  Yes @Html.RadioButton("", true, Model.HasValue &amp;&amp; Model.Value == true, htmlAttributes: ViewData["htmlAttributes"])
  No @Html.RadioButton("", false, Model.HasValue &amp;&amp; Model.Value == false, htmlAttributes: ViewData["htmlAttributes"])
  </code></pre>
  
  <p>But with no effect.</p>
  
  <p>My question is, how can I actually add onchange event to my @Html.EditorFor? (it is radio ).</p>
  
  <p>P.S Sorry for my bad English.</p>
  
  <p><strong>EDIT 1</strong>
  @onchange or @onChange are not working.</p>