Category "blazor"

Blazor RenderFragment to String

I'm developing a code block component using .Net 6 Blazor wasm. I need to display the RenderFragment as string and also render the component in my html. Here is

How to call a function in a Blazor component from a Razor page

I'm creating a MarkdownEditor component for Blazor based on EasyMDE. The project on GitHub is working apart from the file upload because I can't find a way to r

Unhandled exception rendering component: '<' is an invalid start of a value for Blazor WASM

I have an API endpoint which allows anonymous. I have confirmed in Postman it is working for anonymous and authenticated users and returning proper JSON. Becaus

Adding Global Using Directive in blazor

The type or namespace name 'XXX' does not exist in the namespace 'MyClassLibrary.Models' (are you missing an assembly reference?). The error refer to this Blaz

I need to update a Blazor page to update whenever the query string changes

I have a Blazor component named NavBar.razor that displays a Radzen navigation menu with a list of tags. When the user clicks a tag (RadzenPanelMenuItem), the c

Equivalent to ControllerBase's `IsLocalUrl` in Blazor

So I normally have an endpoint in a controllerbase where I check if a given url is local or not with Url.IsLocalUrl(returnUrl), but I can't find an equivalent t

How to create NavMenu with collapsible submenu in .Net Core Blazor app

I am trying to create a blazor navmenu which has a shape like this item a item b when I click on item b it expands with sub menu like this and clicking on subi

Blazor WebAssembly Application fails to load due to integrity errors

We have developed a Blazor WebAssembly Application that has already gone into productive usage for a certain group of customers. The Application works well in a

Difference between @bind and @bind-value

What is the difference of using @bind and @bind-value? I made this simple example, and testing it in the browser, I didn't see any difference. <p>@@bind

How to turn on CircuitOptions.DetailedErrors?

I'm getting this message in the console when running a server-side Blazor app: Error: There was an unhandled exception on the current circuit, so this cir

How Can I Pass an Object Property to a Razor Component as a Parameter

I have a razor component library where I'm creating custom, reusable components. I have a "ContentItem" component that I would like to simply bind the property

How does cascaded parameter Task<AthenticationState> get unwrapped and exposed as "context" in AuthorizeView and AuthorizedRouteView in Blazor WASM?

There is a an object of type AuthenticationState named "context" that is available inside AuthorizeView and AuthorizedRouteView components. This object allows t

Blazor: Drag & Drop list elements

I would like to know how to bind Drag & Drop events to rearrange items in a list. This is the code I have: <PageTitle>Drag & Drop</PageTitle>

Is there a way in Blazor to reverse map wasm-function(#) back to the c# method?

I am running a Blazor page on Chrome and I see from the Chrome profiler that it is spending a lot of time in the code wasm-function(633). Is there any way for

ITrackingConsentFeature not working in production

I have a cookie consent banner in my blazor server app, everything works well when building in debug mode, but when I push it into production I get a "Object re

Blazor 3.1 nested onmouseover events

I have an issue with nested divs both having onmouseover/onmouseout event. I have a nav menu which pops open from the side of the screen triggered by an onmouse

StateHasChanged for specific component instead rerender all components in a page

I am using multiple components is my application each are rendered in conditional manner. Is there any possibilities to re-render a specific component alone? My

PayPal Checkout popup randomly closes

We are having an issue in a Blazor WebAssembly app, which is using PayPal buttons for users to Add Funds to the system's wallet. The issue is random, sometimes

How can I use/inject a service in a "normal" c# class like in Blazor @inject ClassName classObject

I have a Blazor Project, in the Program.cs(formaly aka Startup.cs) I added a service builder.Services.AddSingleton<Models.UserVisit>();

How do you create a Blazor WebAssembly website connected to a database with CRUD functions

I am trying to get deeper into blazor. I want to build a website that can use CRUD functions connected to a database. I use Microsoft SQL Server along with Micr