Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Error CS1660 Cannot convert anonymous method block to type 'type' because it is not a delegate type

$
0
0

In my Blazor .NET 8.0 application I have a list of items in a FluentDataGrid. One of the columns is a template column which contains a FluentAnchor. For the Href attribute there is a hard coded link to which I need to add a parameter from the data used in the row.

The markup/code that I have used is

<FluentAnchor Href="/admin/users/edituser/" + @(x => x.Id)         IconStart="@(new Icons.Regular.Size20.DocumentEdit())"        Style="color:blue">Edit</FluentAnchor>

Now however the FluentAnchor is not displayed. It was prior to me adding the + @(x => x.Id).

I have tried adding the parameter to the both as

Href="/admin/users/edituser/@(x => x.Id)"

and

Href="/admin/users/edituser/@x => x.Id"

but only get these errors:

Compiler Errors


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>