Microsoft Q&A

Blazor

795 questions

A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.

Browse all .NET tags

795 questions with Blazor tags

Sort by: Created
0 answers

EF Core query for a specific condition in related entities and update parent entity

Hello there, In my Blazor Server application, I have Order and Order Details entities which are related as you can imagine. They both have their own repositories. public class Order { public int Id { get; set; } [Required] …

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
425 questions
asked 2023-02-04T19:08:18.7033333+00:00
Cenk 686 Reputation points
commented 2023-02-04T22:34:23.1566667+00:00
AgaveJoe 17,216 Reputation points
0 answers

Blazor Server Castom Elements cross-domain

The Castom Elements function provided by the latest blazer server cannot put custom elements under websites with other domain names. Is there any way to solve the cross-domain problem

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
asked 2023-02-04T14:40:40.37+00:00
雨 时 0 Reputation points
edited the question 2023-02-04T14:43:11.3933333+00:00
雨 时 0 Reputation points
0 answers

Unable to bind the selected image file in Blazor file upload

"This question is updated with minimal sample as my old question doesnt give more info" I am learning blazor and c# fundas with a simple app.This app will allow you tobrowse all kind of files including images.As all kind files we can browse, i…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
asked 2023-02-04T02:38:07.29+00:00
RAMAN RAGAVAN 46 Reputation points
7 answers

How to implement custom elements in blazor 7 (Practical guide) ?

Hi everyone As you know, one of the new features of blazor 7 is custom elements. But there is not enough references & guides which demonstrate how to implement this. for example, I want to create custom element in my blazor server app, then consume…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
asked 2023-02-03T16:39:26.1333333+00:00
Hamed Vaziri 56 Reputation points
commented 2023-02-04T08:50:25.5366667+00:00
Hamed Vaziri 56 Reputation points
0 answers

how to indoor asset position show on building map? and how to track them? in asp.net core

how to indoor asset position show on building map? and how to track them? in asp.net core

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
asked 2023-02-03T09:29:30.3833333+00:00
Mohit S 1 Reputation point
0 answers

I do not know what happened in this code

this is a Blazor code that sends my friend to me and I do not know where I highlighted the code "x" what do , please explain me . thank you . @page "/" <table> <tr> <td>کد ملی:</td> <td…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
asked 2023-02-03T06:40:45.2133333+00:00
hamed farjad 0 Reputation points
commented 2023-02-04T14:53:21.2+00:00
perfect code 161 Reputation points
1 answer One of the answers was accepted by the question author.

Layout design for mobile and desktop (width, height and density)

I want to display data tables in an application on mobile as well as in the web browser or on the desktop and I want it to look appropriate. My idea is to show or hide the table columns depending on the width of the screen ( Note: I can open the row…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 questions
asked 2023-02-02T19:10:53.21+00:00
perfect code 161 Reputation points
accepted 2023-02-04T14:39:08.6766667+00:00
perfect code 161 Reputation points
1 answer

BackgroundService - Is it possible to set parameter value?

Hi, I have a background service. I wonder if it is possible to set a parameter to this service from the Blazor Server application or in any other way? Thank you in advance.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
asked 2023-02-02T16:43:45.4+00:00
Cenk 686 Reputation points
commented 2023-02-04T10:15:19.72+00:00
Cenk 686 Reputation points
1 answer

How to format razor pages in blazor in visual studio 2022

Hi, we are having problems with formatting after upgrade to visual studio 2022. In visual studio 2019 we could format our razor files pretty well, in visual studio it looks really bad. We cannot use 2019 anymore because of the .net 7.

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
asked 2023-02-02T09:09:50.9866667+00:00
Ante Gavranovic 0 Reputation points
edited an answer 2023-02-03T04:55:18.8766667+00:00
Zhi Lv - MSFT 18,876 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

EF Core 6 - Adding records based on a condition

Hi friends, In my Blazor server application, I am inserting BulkPurchaseRequest records into DB as follows. public class BulkPurchaseRequestsRepository : IBulkPurchaseRequestsRepository { private readonly OyunPalasContext _oyunPalasContext; …

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
425 questions
asked 2023-02-01T17:33:09.4066667+00:00
Cenk 686 Reputation points
commented 2023-02-04T09:04:35.3033333+00:00
Cenk 686 Reputation points
0 answers

Unable to find OpenReadstream in image upload functionality in blazor

Hi i am trying to get image url from selected images.The challenge i am facing here is i am not supposed to touch the  OnFilesChanged methode directly.I need to create a seperate class and access the original class items.How i can get image url of each…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
asked 2023-02-01T09:40:56.8366667+00:00
RAMAN RAGAVAN 46 Reputation points
commented 2023-02-02T13:45:39.17+00:00
AgaveJoe 17,216 Reputation points
2 answers One of the answers was accepted by the question author.

Auth cookie is deleted by the browser when it closes

I have a strange problem. When I close my browser (whether Chrome or MS Edge), my authentication cookie is deleted. Consequently, the next time I start the browser, I have to log in again. My controller looks like this: ClaimsIdentity claimsIdentity =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
610 questions
asked 2023-01-31T19:34:06.25+00:00
perfect code 161 Reputation points
commented 2023-02-02T18:52:06.9266667+00:00
perfect code 161 Reputation points
0 answers

iText7 PDF generation help needed

Hello friends, In my Blazor Server application, I am generating a PDF like this. But requirements changed, I need to insert a table and logo like this sample. How can I manage it? InkedScreenshot 2023-01-31 at 19-47-25 Purchase Order -…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
asked 2023-01-31T17:32:57.46+00:00
Cenk 686 Reputation points
1 answer One of the answers was accepted by the question author.

Generate a simple message from controller (blazor page not for razor view)

In a Blazor server application, I have implemented user authentication via cookie. In the Blazor page (not razor view) I have created a form with email and password entries as well as a button for sending the data. The method is Post and is run on the…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
610 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
asked 2023-01-29T12:11:47.5833333+00:00
perfect code 161 Reputation points
accepted 2023-01-29T15:19:10.56+00:00
perfect code 161 Reputation points
2 answers One of the answers was accepted by the question author.

Logout (delete Auth-Cookie) only possible via form!

I have a Blazor server application (see my post here: https://learn.microsoft.com/en-us/answers/questions/1164837/aspnet-authentication-works-but-value-for-user-ide). Now I have implemented a cookie authentication. This works very well via a login and…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
610 questions
asked 2023-01-28T13:26:22.5033333+00:00
perfect code 161 Reputation points
commented 2023-01-28T17:41:48.8333333+00:00
perfect code 161 Reputation points
1 answer One of the answers was accepted by the question author.

ASPNET authentication works but value for user.Identity.Name is null

I get a null value for user.Identity.Name, but user.Identity.IsAuthenticated returns the correct value. I get my claim values too. I have only found a few posts about user.Identity.Name is null, but nothing has solved it. I have a simple login form: …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,585 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
asked 2023-01-27T14:29:56.4566667+00:00
perfect code 161 Reputation points
commented 2023-01-27T15:41:38.02+00:00
perfect code 161 Reputation points
1 answer

Blazor webassembly shows 405 error in localhost (and also when deployed to iis) when redirect back from payment website

I have created a blazor webaseembly project using .net 7. The blazor app redirects to an external url for payment. Once payment is done the payment status page(which is in the blazor app) should be loaded as that's the return url set while calling the…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
asked 2023-01-27T11:08:51.96+00:00
Jayant Guru 0 Reputation points
edited the question 2023-02-01T04:58:36.69+00:00
Jayant Guru 0 Reputation points
2 answers

In C# Blazor Server How Can I Send a 404 From A Static Method?

After much work, I finally found a way to get the IP Address of the client in Blazor Server. To do this, I had to use a site called ipify: <script> function GetAddress() { var script = document.createElement("script"); script.type…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
asked 2023-01-26T15:17:28.5433333+00:00
Data Juggler 146 Reputation points
answered 2023-01-27T03:58:25.25+00:00
Zhi Lv - MSFT 18,876 Reputation points Microsoft Employee
1 answer

Blazor Server - System.InvalidCastException: Unable to cast object of type 'System.Double' to type 'System.Single'.

Hi, In my Blazor server application, I am trying to get the records from RazerReconciliation table as follows. I couldn't figure out why I am getting this error. public async Task<List<RazerReconciliations>> GetOldReconsAsync() { var…

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,999 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
425 questions
asked 2023-01-25T06:21:35.1233333+00:00
Cenk 686 Reputation points
edited an answer 2023-01-25T06:42:04.0533333+00:00
Viorel 82,906 Reputation points
1 answer

Access native functionalities in .Net MAUI Blazor app with embedded Angular application

Hi, We are working on creating a mobile application using .Net MAUI Blazor as technology. We were trying different approach Load dist folder of Angular application build into Blazor application Load direct angular application through weburl We were…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
795 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
559 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
630 questions
asked 2023-01-24T09:12:41.6566667+00:00
Varpe, Nitin 0 Reputation points
answered 2023-01-24T18:06:09.0266667+00:00
Bruce (SqlWork.com) 28,276 Reputation points