title: Blazor error "The call is ambiguous between the following methods or properties" when working with InputSelect
body: <p>I am working on a server side Blazor application. My goal is to dynamically populate a dropdown with a list of objects, then do something with that object when it is selected. This is the error I am getting:</p>
  <pre><code>The call is ambiguous between the following methods or properties: 'RenderTreeBuilder.AddAttribute(int, string, string?)' and 'RenderTreeBuilder.AddAttribute(int, string, MulticastDelegate?)'
  </code></pre>
  <p>The error is in the file &quot;ListDropdownComponent.g.cs&quot; I have not made any changes to this file, so I suspect Visual Studio is pointing me to the wrong source.</p>
  <p>When I comment out this bit of code the error goes away, so I think this is where the error is:</p>
  <pre><code>&lt;InputSelect @bind-Value=&quot;SelectedList&quot; TValue=&quot;ListModel&quot; @onchange=&quot;AddToList&quot;&gt;
      &lt;option value=&quot;@null&quot;&gt;Add to list&lt;/option&gt;
      @foreach (ListModel list in Lists)
      {
          &lt;option value=&quot;@list&quot;&gt;@list.ListName&lt;/option&gt;
      }
      &lt;option value=&quot;@(new ListModel{ ListID = -1, ListName=&quot;New List&quot; }) &quot;&gt;New List&lt;/option&gt;
  &lt;/InputSelect&gt;
  </code></pre>
  <p>SelectedList is using the ListModel class:</p>
  <pre><code>public ListModel SelectedList;
  </code></pre>
  <p>UPDATE: I switched to using the int ID property of my class and I am still getting the same error. So I have no idea what the cause is.</p>
  <p>UPDATE 2: This is the problem: value=&quot;@null&quot;. I will find a way to work around this, but since int? is nullable I would still like to know what the actual issue is.</p>