I am using Razor pages in .net 5.0
I wanted to use anchor tag helper to generate href
as shown below
<a asp-page="/Add" class="ml-4 d-lg-block" @* something *@)"
When add any c# code with tag helper it is giving a compile error
in this I have added @* something *@
but it is giving a compile error
and also If I use any condition to render a tag, It is throwing compile error
<a asp-page="/Edit" @(Model.Condition?"":"disabled")>
saying compile error : The taghelper 'a' must not have c# in the elemnts attribute declaration area
How can I use C# along with tag helpers to satisfy both of the above condtions