Q:

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

0

This code will help you to understand the 'RegisteredFunction' does not exist in the current context in Blazor.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

‘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");
    }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now