title: Ambiguous error message when the page loads
body: <p>I'm learning Blazor and a simple Blazor reg form is giving me the blues.  Below is the html, code and the error message.  One odd thing that's happening is that the <code>Submitted</code> method is executed when the page loads without the submit button of the form being clicked.  Then the page errors out with the error below in inspect.  What am I doing wrong please?  Thanks in advance.</p>
  <p><a href="https://i.stack.imgur.com/EPgv2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EPgv2.png" alt="Error Message" /></a></p>
  <p><a href="https://i.stack.imgur.com/7PgQc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7PgQc.png" alt="Form" /></a></p>
  <pre><code>@code {
  
  public Register()
  {
  
  }
  
  public RegisterDto rdto { get; set; } = new RegisterDto();
  
  public async Task Submitted()
  {
  
      HttpResponseMessage hrm = await _httpClient.PostAsJsonAsync&lt;RegisterDto&gt;
  (&quot;https://localhost:44368/api/Account/Register&quot;, rdto);
  
      if (hrm.IsSuccessStatusCode)
      {
          string ss = await hrm.Content.ReadAsStringAsync();
          
      }
  
  }
  </code></pre>
  <p>}</p>