Content
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 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
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…


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…


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
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…


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…


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.
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.


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; …
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…


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 =…


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 -…
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…


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…


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: …


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…


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 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…
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…

