Questions tagged [blazor-client-side]

The client side execution of commands in the browser; apart from the server side code.

Blazor is a web framework designed to run client-side in the browser on a WebAssembly-based .NET runtime (Blazor WebAssembly) or server-side in ASP.NET Core (Blazor Server). Regardless of the hosting model, the app and component models are the same. ASP.NET Core Blazor hosting models

784 questions
37
votes
7 answers

Is there any hot reload for blazor server-side?

I have just one, quick question. Is there way to hot reload a blazor app? At least, .razor files? Now I'm hosting my app on local IIS (not IIS express). I was looking through internet, but i didn't found anything helpful. Thank you all for anwsering…
29
votes
6 answers

Blazor client-side debugging

I noticed that all of my C# breakpoints do not get hit as debugging seems like its disabled for client-side Blazor apps. Is there a way to attach the debugger or enable the debugger somehow? Thanks
AlvinfromDiaspar
  • 5,868
  • 13
  • 63
  • 120
20
votes
6 answers

How to use Bootstrap modal in Blazor client app?

I am trying to show bootstrap modal then bind its buttons. But I cannot pass the first step showing the modal. I am using Blazor client template of .net core 3.1. I have a page named Modal.razor which contains the bootstrap modal I found from…
Sorush
  • 1,384
  • 3
  • 14
  • 27
18
votes
8 answers

There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'

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 no runtime pack for Microsoft.AspNetCore.App…
Kasta
  • 1,086
  • 1
  • 10
  • 22
17
votes
4 answers

Found markup element with unexpected name 'Cascading AuthenticationState'

I am getting this error on my App.razor: Found markup element with unexpected name 'CascadingAuthenticationState'. If this is intended to be a component, add a @using directive for it namespace This is the code I am…
Ibanez1408
  • 3,275
  • 8
  • 31
  • 75
14
votes
4 answers

How can I write into the browser´s console via Blazor WebAssembly?

In JavaScript we can use the following call to write debug output to the browser´s console: console.log("My debug output."); Output in Google Chrome: How can I log "My debug output" in my component to the browser´s console via Blazor…
Simon
  • 3,043
  • 1
  • 35
  • 66
12
votes
5 answers

Unable to debug Blazor hosted webassembly 3.2.0 from Visual Studio 2019 16.6.2

I have Visual Studio 2019 16.6.2 installed, along with the .NET Core 3.1.301 SDK and all the necessary Blazor templates. If I create a brand new Blazor WebAssmbly application, I can run it from Visual Studio by pressing Ctrl+F5 and it opens a new…
11
votes
2 answers

Blazor WebAssembly: The provided ContentType is not supported;

I have installed the Blazor WebAssembly Example Project (WeatherForecast) today by the following command line: dotnet new blazorwasm --hosted -o ProjectName I started the SPA directly after the installation via Visual Studio 2019 in Debug Mode. The…
11
votes
4 answers

Blazor WASM doesn't hit breakpoint

I have a Blazor WASM Project with version 5 assemblies and tried to activate debugging according to this article: https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-3.1 For that I made sure I updated all the assembly…
NPadrutt
  • 2,651
  • 3
  • 14
  • 42
11
votes
5 answers

Blazor redirect to login if user is not authenticated

I am trying to develop an app using Blazor WebAssembly and I am wondering about how I can protect my whole application if the user is not authenticated. The behavior I would implement is: If an anonymous user asks for any page, then he will be…
Leonardo Lurci
  • 1,069
  • 1
  • 11
  • 23
11
votes
1 answer

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?
10
votes
1 answer

Convert Blazor Server App to Blazor Web-assembly approach

I want to develop an SPA project by Blazor technology. Due to complexity of debugging the Blazor Web-assembly application, I would like to first create it as a server-side app, and then later change it to a Web-assembly application app. Is this…
10
votes
4 answers

How to add font awesome to Blazor client (razor component) app?

I created a blazor webassembly hosted template dot net core 3.1. Then right clicked on project.Client/wwwroot/css folder and click on add client side library. Then selected font-awesome library in installed it. I added below line to index.html…
Sorush
  • 1,384
  • 3
  • 14
  • 27
10
votes
3 answers

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: ... @code { private TabSet tabSet; ... } In the OnAfterRenderAsync method I…
INNVTV
  • 2,623
  • 3
  • 30
  • 54
9
votes
2 answers

Blazor TwoWay Binding on custom Component

I'm creating a blazor server side app and have problems to bind a value between two custom components. I've looked through different example of how the bind or @bind is supposed to work but I cannot figure out what up to date information on this…
1
2 3
52 53