aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Razor syntax error in template?

Open CanYouProgram opened this issue 8 years ago • 2 comments

I have dotnet version2.1.300-preview2-008533,

When I create a template for blazor, my counters button is

<button onclick="IncrementCounter"

I get an error stating onclick cannot be found but this seems to be typical razor syntax?

CanYouProgram avatar May 02 '18 02:05 CanYouProgram

@OnClick(IncrementCounter) is old syntax. As the current templates show when you create a new project in VS, you should use onclick=@IncrementCounter or onclick="@IncrementCounter"

Suchiman avatar May 02 '18 02:05 Suchiman

Thanks. Ive been chasing my tail for like an hour..

CanYouProgram avatar May 02 '18 02:05 CanYouProgram