小编AlE*_*lEx的帖子

CS0428 C# 无法将方法组转换为非委托类型“对象”。您打算调用该方法吗?

我在 Blazor 中收到此编译器错误(“CS0428 C# 无法将方法组转换为非委托类型“对象”。您打算调用该方法吗?”),我真的不知道如何修复它或采取哪条路线。该错误发生在下拉列表的两个 onchange 事件上。请帮忙!

<select class="form-control" onchange="**@ReportingYearClicked**" style="width: 95px">
   <option value="">-- Select Reporting Year --</option>
    @foreach (var year in @yearlist)
    {
      <option value="@year">@year</option>
    }
   </select>
 
<select class="form-control" onchange="**@ClientClicked**" style="width: 600px">
   <option value="">-- Select Client --</option>
   @if (ReportingYear == "ALL")
   {
    @if (client != null)
    {
     @foreach (var client in @client)
     {
      <option value="@client.ClientUno">@client.ClientUno &nbsp; @client.ClientName</option>
     }
    }
   }
   else
   {
    @if (clientListDto != null)
    {
     @foreach (var client in @clientListDto)
     {
      <option value="@client.ClientUno">@client.ClientUno &nbsp; @client.ClientName</option>
     }
    } …
Run Code Online (Sandbox Code Playgroud)

asp.net-core blazor

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net-core ×1

blazor ×1