title: How to set input box value to a string in Blazor WebAssembly?
body: <p>I am using Blazor WebAssmebly. I have an input box and I simply want to reset it to no text after the user types in text and hits the Enter key:</p>
  <p>&lt;input id=&quot;txtWord&quot; name=&quot;txtWord&quot; placeholder=&quot;Enter your text&quot; @onchange=&quot;@onChange&quot; @onkeyup=&quot;@Enter&quot; /&gt;</p>
  <pre><code>private void onChange(Microsoft.AspNetCore.Components.ChangeEventArgs args)
  {
      value = (string)args.Value;
  }
  
  public void Enter(KeyboardEventArgs e)
  {
      if (e.Code == &quot;Enter&quot; || e.Code == &quot;NumpadEnter&quot;)
      {
          if (value.Trim() != &quot;&quot;)
          {
              doSomething();
          }
      }
  }
  </code></pre>
  <p>So I set the variable 'value' to the input text, but then I want to clear the text box. How do I do that?</p>