title: Is there a way to update a binding variable attached to an Input text Item in Blazor when using Ctrl +V combination keys?
body: <p>I have this input which is to capture a phone number.
  When the user enters a number and press the <em>"Enter"</em> Key the Method "KeyWasPressed" is triggered and some validation happens. this works as expected BUT...</p>
  
  <p>When the user copies and pastes the number from excel, for example, the variable <code>@Phone</code> doesn't updates its value so when the user presses the <em>"Enter"</em> key the validation sends and empty value.</p>
  
  <p>Is there a way to refresh/update <code>@Phone</code> variable when some text is pasted to the input control?</p>
  
  <p>Here is a snipped of my code:</p>
  
  <pre><code>&lt;input type="number" class="form-control" @bind="@Phone" @onkeypress="@(async e =&gt; await KeyWasPressed(e))" placeholder="Client Phone Number" /&gt;
  
  @code {
  
      string Phone { get; set; }
  
      private async Task GetClientInfo()
      {
          if(String.IsNullOrWhiteSpace(Phone))
          {
              notificationMessages = $"Add a phone number";
          }
          else
          {
              showSpinner = true;
  
              clientInfo = await ApiHelper.GetClientInfoByPhone(Phone);           
  
              if(clientInfo != null)
              {
                  var singleViewId = clientInfo?.SingleViewId;
                  var customerNumber = clientInfo?.Accounts?.FirstOrDefault().CustomerNumber;
                  var status = clientInfo?.Accounts?.FirstOrDefault().Status;
                  showClientInformation = true;
  
                  var CrossSell = clientInfo?.Accounts[0]?.CrossSell;
  
  
              }
              else
              {
                  showClientInformation = false;
                  notificationMessages = $"No client data for this phone ({Phone})";
              }
  
              showSpinner = false;
          }
      }
  
      private async Task KeyWasPressed(KeyboardEventArgs args)
      {
          if(args.Key == "Enter")
          {
              //await GetClientInfo();
          }
      }
  }
  </code></pre>