Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Browsing all 4839 articles
Browse latest View live
↧

Dependency injection in Blazor does not work while switching page

I have a classpublic class SessionState { public int id { get; set; } public bool verified { get; set; }}And in every page I have injected the class with @inject SessionState state.I want to fill...

View Article


Show details of uncaught exception in Blazor UI

We have a customer that is using a custom browser, which doesn't allow them to open the console to see the logged error messages. Unfortunately we don't have access to their system so we need to...

View Article


How to check the contents of a Blazor Server batch render message sent to the...

I'm trying to optimize a Blazor Server application and I am stuck on one of the pages which contains a table with a lot of components inside.First, I switched the table to use Virtualization, which...

View Article

There was no runtime pack for Microsoft.AspNetCore.App available for the...

Trying to migrate from ASP.NET Core 3.1 to 5.0 using this guide provided by Microsoft.Installed SDK 5.0.100-rc.1 with runtimes. Updated project as guide says and still getting following error:There was...

View Article

How Can i update the live date time in c# blazor web page

I am trying to set the live DateTime in blazor webpages. I tried using Datetime.now . it's not updating the live time. I want to do it without using javascript.Any help regarding this issue?

View Article


Base address of HttpClient is getting null for the first time in...

In my Blazor web app(auto render mode), I have added the http client as service in server project like bellow:builder.Services.AddHttpClient();I also added http client in the web assembly (client)...

View Article

SignalR hub method is not getting called in Blazor

I'm using .Net 8.0 in Blazor.I have a server project and a client project.The server receives a notification via a controller method and this should invoke a method on the signalR hub to 'push' a...

View Article

Blazor Server - 'Code Behind' pattern: OnInitializedAsync(): no suitable...

I have a Blazor (Server) application which runs perfectly fine, and which adheres to all rules set by Microsoft.CodeAnalysis.FxCopAnalyzers and StyleCop.Analyzers.A heavily cut-down razor page is as...

View Article


What is the correct and reliable way to retrieve HttpContext in Blazor?

Let's consider a simple blazor app (the standard template) in which i need to have some info about the user which is connected, like:SessionIDIpAddressUser Identity NameUsually, I retrieve this...

View Article


Blazor Server 'Error: server timeout elapsed without receiving a message from...

I've been trying to resolve server timeout disconnects in my Balzor Server app for many months now. I've tried lots of different things, but nothing has worked thus far. I'm just about done with the...

View Article

Cannot authenticate in a .NET 8 maui blazor hybrid app for Microsoft Entra id

I have an existing Blazor server app that connects to Microsoft Entra id and an Azure SQL database just fine. The client wanted to create a mobile app for patients. The blazor server app is just for...

View Article

Unable to cast object of type 'System.String' to type 'System.Int32'. on...

I have tried to call a page with /somepage/{Id} where Id is a [Parameter] with a int property and the route is called as a string, it shouldn't be impicitly converting string to int? why it it wouldnt...

View Article

All values reset when EditForm has OnValidSubmit

I have a Blazor component. An Id is passed in but when the OnValidSubmit of the edit form fires first it runs 'OnInitializedAsync()' as expected.I set a parameter first to true on the page load and set...

View Article


How to generate Authenticator QR Code with Blazor .NET 8 in razor component

When using the new Identity razor components from .NET 8 you still get a link to this article:...

View Article

Blazor OnInitialized: No suitable methods found to override

I keep getting these red squiqqlies all over my blazor server project. (I keep my code and razor files separate) The project builds find though without any errors.When I inherit each of these classes...

View Article


How can I open a new window without using JS

In blazor i use NavigationManager.NavigateTo(url)in order to change window location, but how can I use it to open a new tab with a specified URL without having to invoke JS on OnAfterRenderAsync()

View Article

Blazor unhandled exception in edge, debug mode, https

Every blazor project that i run in debug mode/https/microsoft edge throws an unhandled execption.If i turn on script debugging everything works fine.Debug mode/https/chrome -> no problemsDebug...

View Article


How to dispose delegate in blazor or c#

Below I have attached my blazor code.private delegate Task keyActionDelegate(KeyboardEventArgs e);private KeyActionDelegate _keyActionDelegate;protected override async Task OnParametersSetAsync(){...

View Article

Truncate text in a MudTable cell

How can I instruct a MudTable to truncate text in a cell instead of allowing the text to wrap onto the next line?Here is a code sample<MudTable Items="@data"><ColGroup><col style="width:...

View Article

Blazoredmodal.razor.js route "_PAGENAME_content/" instead of "content/"

I have a Blazor Server App, using Blazorize (net core 6).When my page has this route:@page "/"Blazorize tries to retrieve the JS from here (which is...

View Article
Browsing all 4839 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>