How to Rename a Solution and Projects in Visual Studio 2022 Without Affecting Functionality?
I have a working application that includes Blazor Server, Blazor WASM, and an API. I want to change the names of the solution and the projects while ensuring that the current application remains unaffected. What is the easiest and problem-free way to…
How to merge file with different extensions in C#
Merging Files having different extensions into one given file with .mrg extension
Sending Image screenshot to email
Hi, I was trying to capture div contents and send to email but when I tested it, I got this Ststem.Byte[] Here is what I got I then tried this, but may I please know the correct one to use, please? I have image controls to the AlternateView protected…
Embed SSRS rdl Reports to an existing ASP.NET application
I have a project scenario that requires embedding SSRS rdl Reports to an existing ASP.NET Core application. I have made some research prior to posting here and I came across a library called ReportViewer, was able to get some results but only showed one…
How to add an item in a sharepoint list, for a choice.
Hi, I am trying using c# to create an item in a sharepoint list. I try directly in the graph explorer, and i can create a sharepoint list item directly in it if the field is basic ( text or number). But when it comes to a choice column i failed. I keep…
asp.net Web application signing in Azure Active Directory
I have the following code in my application for AD authentication: public void SignIn() { if (!Request.IsAuthenticated) { HttpContext.GetOwinContext().Authentication.Challenge( new AuthenticationProperties{ RedirectUri =…
configuration method not executing in startup.cs
I have created new mvc project and added startup.cs class with one method. but debug is not coming in this method directly debug is going on homecontroller but it should come first startup class. why my debug is not coming in configuration method. public…
Bubble sort implementation in c#
Here's how to implement a bubble sort in c#. Follow for more content like this :) int[] array = { 108, 23, 69, 420, 9 }; int temporary; for (int j = 0; j <= array.Length - 2; j++) { for (int i = 0; i <= array.Length - 2; i++) { if…
Multiple emails validation with split comma in a Textbox
Hi, If I have a TetxtBox that will be used to send messages to multiple emails, how can I validate these emails that will be inputted in the textbox? The emails are separated by comma. e.g. myfirstmail@hotmail.com, mymail@outlook.com,…
How to fix Aggregate Measurements in order to display properly?
Hi, I am working on a Blazor application for weight measurement. Data is coming from a third-party device in real time. I have this weighing results component on my dashboard that I am trying to display on a grid according to some rules. The data grid…
Read an HTML-table in C#
Hello I'm trying to read an HTML-table from this link [https://www.borsaitaliana.it/borsa/obbligazioni/mot/btp/lista.html?lang=it&page=1] I wrote this code string strLineOut = ""; string pathOut =…
Windows.Data.Pdf.PdfDocument Crash with file size greater than 2GB
Same issue as here (no replies there, it's an old thread) https://learn.microsoft.com/en-us/answers/questions/248422/windows-data-pdf-pdfdocument-crash My notes: Crash is not catchable which makes it really hard to find reason for issue or…
How to close Bootstrap modal in Blazor WASM?
Hi, In my Blazor WASM (.net 6) application, I am displaying a modal popup as follows. <!-- Modal --> <div class="modal fade bg-transparent" id="templatemo_search" tabindex="-1" role="dialog"…
System.NullReferenceException: 'Object reference not set to an instance of an object.' when navigating to page in WinUI
I am working with a WinUI project which is built based on the MVVM Toolkit template. When I use NavigationService.NavigateTo(typeof(EmployeeViewModel).FullName!); to navigate to EmployeePage, the program crashes with the bug that…
Issue with Forbidden Error When Updating BookingBusiness in Graph API
I am trying to update a booking business using the Graph API in C#. I can retrieve my booking business without any issues. However, when attempting to update this booking business, I receive a "Forbidden" (403) error, even though the changes…
ASP.NET Gridview Header column not freezing properly
I'm using gridview with freezing header in ASP.NET application. But, freezing is not showing while running the application. what is the issue in the below code...? <%@ Page Language="C#" AutoEventWireup="true"…
stripe not working.NullReferenceExceptionObject reference not set to an instance of an object
Hi, Thanks for the help. However, My stripe is not loading. Any help. There is an error: Object not set to an instance of an object. Github Link:https://github.com/Thibaut501/Mango Awaiting your reply, Best Regards, Fabrice
how do I export C# datatable to Excel 365
I have been using the following code to export a dataTable to Excel. I now have users that have upgraded to Microsoft 365 and this no longer works. My research to make the export work to Excel 365 is not panning out. any help would be grateful public…
How to Remove Sequence Elements from JSON Output
Hello all, I am using the following code: private class ArrayTest { public int Count { get; set; } public double Time { get; set; } } public async Task<IActionResult> Get24HourLogonsById(int id, CancellationToken token) { ... var result…