Category "blazor"

Blazor Webassembly Prerendering: How to avoid HeadContent render two times

I have a Blazor WASM prerendered .NET6 application. In Index.razor on the Hosted server project, I have a component that loads css files dynamically. The probl

How Blazor Server AOP logging?

I would like to implement and use an AOP logging in my Blazor Server .NET 5 (C# 9) application, for generic enter-exit-exception scenarios for the marked method

How to send data from Child to Parent component in Blazor (when a list is clicked)

I have a simple component like this: @foreach(book in store) { <li @click="@SelectBook(@book.id)"> @book.title <li> <!-- book.id throws error

blazor how pass list of some type to EditorAttribute

im building some generic forms builder so im at the point where i can public class Model { [Editor(typeof(CustomIntEditor), typeof(InputBase<>))] publ

Mudblazor clear TextField after "Enter"

I am using Mudblazor component TextField in my Blazor Server project. I want to clear the TextField after I press "Enter" Here is my code in my Index.Razor : @p

Blazor Repeatable EventCallback for Menu Item

I am working on a repeatable "Card" component that has a list of menu items and actions that this menu can take. However I cannot get the functionality to work

How do I tell or allow Blazor to "refresh" an HTML element from its bound value that hasn't changed?

When I have a one-way binding on a HTML element and accompanying binding on onchange that doesn't always change it, then how do I tell or allow Blazor to "refre

How to deal with IEnumerables/Arrays/Collections in Fluxor State?

I'm currently trying to implement Fluxor for my Blazor WASM app and all the instructions/tutorials I found recommended something like this example for the Store

Blazor, how can I change a component in MainLayout when I change page

I want to add a toolbar inside website, the toolbar change inside component on each page. For now, I have this but I want my toolbar to be like this. How could

When I add SCEditor to my Blazor project, the editor keeps appearing in strange places, sometimes in multiple copies. How do I fix this?

I want to use SCEditor in my Blazor page. For example I create a new Blazor WASM project and I did these steps: According to documentation I add this codes and

Generic RenderFragment not allowing parameters

I create a component PopupForm which take PopupFormAvatar component as parameter [Parameter] public RenderFragment PopupFormAvatar { get; set; } [Parameter] pu

How to use DBContextFactory in Generic Repository

My current application has three layers: Web, Infrastructure and Core. Generic Repository is in Infrasturcture layer and works fine with DBContext. After I swit

Is OpenCV with Blazor WASM in .NET6 feasible?

I'd like to process images on clientside with Blazor WASM and OpenCV. I can run OpenCV with the OpenCVSharp4 NuGet Package serverside, but that wont cut it. If

.NET 6.0 Blazor Server app: WebSocket connection to 'ws://localhost:60908/BlazorApp1/' failed

When I create a new, clean Blazor .NET 6.0 app and start it (using Visual Studio 2022), I see the following error in the browser console: WebSocket connection t

C# and MongoDB - Returning values from an object

I'm hoping someone can help: I have MongoDB collection for a User which has an Array called Reports which holds objects with IDs. I can retrieve the IDs but I'm

Blazor Server set multiple default values for select drop down list

I have a Blazor server app (.net 6) page that has a select drop down list, which is set to allow multiple selected items. I need to set default values, when th

dotnet watch run -c $(Configuration) with hot reload

I want to launch my Blazor app with specific configuration and have hot-reload enabled. When I launch with: dotnet watch Hot reload is enabled and everything i

Chat Realization with Singleton vs Separate SignalR Hub

I was just wondering why the recommended solution for a Blazor-Server-Chat by Microsoft is initializing a Signal R Hub. Technically, all the C# Code is executed

Blazor Server App JavaScript Libraries Not working (Metronic Template)

I have Blazor Server Side app, where I have added JavaScript and CSS Libraries for Metronic Bootstrap Template. The template is fully loaded when I run the app,

automatically read path to Razor page in Nav Menu

What I want to do is to read the path as indicated with the @page attribute of every Razor Page, to link to it in the Nav Menu. With the purpose of not having t