Blazor

The name ‘RegisteredFunction’ does not exist in the current context in Blazor.

The name ‘RegisteredFunction’ does not exist in the current context in Blazor.

‘RegisteredFunction’ does not exist anymore from Blazor v0.5.0.

JavaScript code

function JSMethod() {
   document.getElementById('demop').innerText = "JavaScript Method invoked";
}

Blazor code

@page "/jsinterop"
@inject IJSRuntime JsRuntime;


@code {
    protected void CallJSMethod()
    {
        JSRuntime.InvokeAsync<bool>("JSMethod");
    }
}

I would suggest you check the below link for better understanding:
https://stackoverflow.com/questions/52504547/blazor-namespace-interop-does-not-extist-in-the-namespace

Sumitra Kumari Shaw

An Engineering graduate who Enjoys building things that live on the internet.