How do you bind the value of the HTML element with a C# property in Blazor?
You have to use the bind attribute to reflect the DOM element value in the C# property.
Visual Studio crashes when I paste markup in the functions block. How do I fix this?
Yes, this is a known issue while working with Visual Studio. You can track the details in this GitHub thread. [Issue Resolved]
Issue—System.InvalidOperationException: Object of type ‘Microsoft.AspNetCore.Components.Forms.InputText’ does not have a property matching the name ‘type’.
As of now, there is no support for including arbitrary attribute support for the built-in input component <InputText />. You have to remove the type attribute to resolve this issue. There is a plan for including the type=”password” attribute for the <InputText> component, which can be tracked in this GitHub thread. [Issue Resolved]
I could not find the property of window when calling the JavaScript method in Blazor using JS interop.
You have to refer to the JavaScript method implemented JS (external-script.js) file in index.html properly and then call the function from .NET using IJSRuntime. [wwwroot/index.html] [wwwroot/external-script.js] [Pages/Index.razor]
How do you use the invoke method on a parameter value change?
The better solution is to invoke the method in the set value of the parameter. You can also override the OnParameterSet or OnParameterSetAsync lifecycle methods. Those methods are triggered every time any parameter value changes.