453 questions
10
votes
1
answer
15k
views
Cannot debug Blazor wasm
I'm using vscode. I cannot debug "standalone" (or "hosted") blazor wasm.
There are many questions like this, but they are for RCs, bugs apparently fixed for .NET 6, or tooling bugs ...
7
votes
2
answers
9k
views
Best way to share data between two child components in Blazor
I have this code.
<ParentComponent>
<ChildComponet>
@renderFragment
</ChildComponent>
<ChildComponetn>
<GridComponent Data="@dataList"/>
&...
8
votes
2
answers
6k
views
How to use both Blazor client and server in same web
I'm learning about the Blazor, and see benefit of 2 types client-side and server-side.
I want to use both on the same web e.g. one path is a client-side WebAssembly app, another path is a server-side ...
1
vote
1
answer
8k
views
Embedding a Leaflet map on a Blazor SPA
How to Embed a Leaflet map on a Blazor SPA, using JSInterop, what objects should be defined, and how to pass data that represents the location clicked on the map, from JavaScript to Blazor
77
votes
14
answers
76k
views
There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'
I'm trying to migrate from ASP.NET Core 3.1 to 5.0 using this migration guide provided by Microsoft.
I installed SDK 5.0.100-rc.1 with runtimes. I updated the project as the guide says, but I'm still ...
4
votes
1
answer
4k
views
Create a multiple WebAssembly projects in a single solution
Please, see this question for context and the answer by MrC aka Shaun Curtis
This question is about something I've tried to solve in the past without great success. Are you familiar with this sample ...
1
vote
1
answer
2k
views
Unable to find files located in my root project folder when hosted on Azure
I tried to find files located in the root project of my Blazor Client WebAssembly project. While it works when executed locally on my computer, it doesn't work when hosted on Azure.
When executed ...
53
votes
3
answers
69k
views
How to use alert(),confirm() and prompt() function using Blazor?
I'm learning the Blazor technology. I started a default increment project in VS 2019 and I have modified the code for Decrement with confirm() and alert but it does not work.
@page "/counter&...
25
votes
3
answers
8k
views
Blazor WASM Net 6 Preview 4 Azure AD - There was an error trying to log you in: 'Cannot read property 'toLowerCase' of undefined'
I have a simple Blazor WASM running Net 6 Preview 4 that I setup using this guide:
https://learn.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/hosted-with-azure-active-directory?view=...
0
votes
3
answers
3k
views
Blazor component removed from DOM before disposal causes js interop to fail
My Blazor component has some associated JavaScript, which performs (async) animations.
MyComponent.razor
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (someCondition & ...
22
votes
8
answers
35k
views
NET5.0 Blazor WASM CORS client exception
I have a Blazor WASM app and a Web Api to get called by Blzor via HttpClient. Both programs run on the same machine (and also in production environment which should not be to exotic for a small ...
20
votes
2
answers
12k
views
How to render a Blazor component into an HTML string
I'm looking for a way to render a Blazor component into an HTML string, so that I'll be able to use it as a templating engine to create and send emails in my web application. Ideas?
6
votes
1
answer
9k
views
Blazor WebAssembly: How to get UI to update during long running, non-async process
I have some complex calculations that take a while to do. (Yes, I know, client-side may not sound like the ideal place to do them, but there are good reasons for it.) I would like the page to update ...
5
votes
4
answers
5k
views
Blazor WebAssembly + Amazon Cognito
I would like to set up a Blazor client-side app with authentication through AWS Cognito.
When I run the app I'm not redirected to a login page, instead the page says "Authorizing..." for a few ...
34
votes
1
answer
36k
views
C# Blazor WebAssembly: Argument 2: cannot convert from 'void' to 'Microsoft.AspNetCore.Components.EventCallback'
I'm new to blazor C# and trying to make a simple countdown timer website. My website consist of:
Text to display the timer
Start and stop button
Buttons to set the timer
I'm having a problem in the ...
16
votes
3
answers
34k
views
How to connect Blazor WebAssembly to DataBase
I recently started developing a Blazor WebAssembly app, and now I'm settling on a database connection.
All lessons and instructions say that you need to enter information into the Startup.cs file and ...
11
votes
1
answer
6k
views
Wrap an existing Blazor Web Assembly app into a .NET MAUI Hybrid App
I watched this tutorial on how to create a .NET MAUI Blazor App
https://www.youtube.com/watch?v=bnoCU5XGBh4
However I have an existing Blazor Web Assembly app, what is the best recommended way to wrap ...
9
votes
3
answers
4k
views
Why use await Task.Delay(1) in Blazor wasm?
Many SO answers use await Task.Delay(1) to solve various async rendering issues in Blazor (wasm). I've even found a number of places in my own code where doing that "makes it work".
However ...
6
votes
5
answers
4k
views
It possible to click outside an element to close it on Blazor?
It's a little duplicated Event for click outside a div or element to close it on Blazor, but no right answers.
(And I didn't find anything on my topic in Google)
In JS I just use "window.onclick&...
4
votes
5
answers
24k
views
Simple expandable table with Blazor
I want to create a simple expandable table in Blazor WebAssembly. I added some HTML code like the following:
<table class="table table-hover">
<thead>
<tr>
<...
2
votes
2
answers
2k
views
Subscribe to an EventCallback from a Layout when using Router
Have working knowledge of Blazor WebAssembly but not too advanced.
I'm good with EventCallback from child components. What I haven't seen anywhere documented is how to subscribe to EventCallback from ...
1
vote
2
answers
3k
views
How to close a Blazor Webassembly Modal
I have a blazor webassembly component for a modal pop-up. So far it works, but it will only close when you click the x button and not when you click off
Here is the code in question
@using System....
0
votes
1
answer
2k
views
Is it possible to load dynamically existing page in a Bootstrap Modal body
I'm new to a Blazor and now I'm working to Blazor WebAssembly project.
I have couple razor page with a table where I'm displaying data from SQL. When I click in one of the table rows it opens a page ...
27
votes
20
answers
64k
views
Exception: '<' is an invalid start of a value
I have a Blazor Webassembly project with a controller method as follows:
[HttpGet]
public async Task<List<string>> GetStatesForProfile()
{
IConfigurationSection ...
25
votes
2
answers
34k
views
Blazor Component Reference Null on First Render
I have a custom component with an event Action called TabChanged. In my Razor page I set the reference to it up like so:
<TabSet @ref="tabSet">
...
</TabSet>
@code {
private TabSet ...