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

Blazor .Net 8 OnAfterRenderAsync

$
0
0

In Blazor .Net 8 I cannot implement OnAfterRenderAsync. It gives me the error "No suitable method found to override".

I thought my project was corrupted so I created a new test project:

Blazor Web App.Net 8Authentication: noneAuto (Server and WebAssembly)Per page/component

On Home.razor tried to add OnAfterRenderAsync and still get the same error. Here is the home page code. I tried InteractiveServer with prerendering and without prerendering. Same error.

@page "/"@rendermode InteractiveServer@* @rendermode @(new InteractiveServerRenderMode(prerender: false)) *@<PageTitle>Home</PageTitle><h1>Hello, world!</h1>Welcome to your new app.@code {protected override async Task OnAfterRenderAsync(){}}

Has anyone else had this issue? I even updated to the latest Visual Studio before creating the new test project.


Viewing all articles
Browse latest Browse all 4287


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