Category "c++sharp"

NLog ApplicationInsights - Instrumentation Key from appsettings.json only loading for TelemetryClient

In my .NET 5 aspnetcore application, NLog is mostly working except for loading the Instrumentation Key from appsettings.json for the logger. It seems to be load

Are there specific issues with .NET Core apps and System.Reflection.Assembly.LoadFrom(...)?

I'm using a tool I wrote that makes a call to the following line in order to inspect a few things, including the assembly version: var assm = System.Reflection.

On DatatableJS server side, how to make a column's order not callback server?

I use datatablejs server-side in my MVC project. When I click to a column it sends the column name to server and I take the column name after all I order the ta

Big button in navigation view. WinUI / xaml

Does anyone know how to make a big button with subtext and a picture in a navigation panel (using xaml)? Like in the Windows 11 settings app. Like this...

How to merge two lists using LINQ Suming a especific field when the id matched

Considering I have 2 list (firstList and secondList), both with same properties, but with diffent values. I need the result merge both lists, but it must consi

How to view System.Diagnostics.Trace.WriteLine output in DbgView?

I have an ASP.net web-site hosted on IIS, and the code calls: System.Diagnostics.Trace.WriteLine("test"); Reminder: You use Trace, rather than Debug, because D

Fetch Products from database with category and subcategory attached

I am building a web api and want to fetch all the products from product table I have in my database and I also want to include the category and subcategory whic

How to compare date in string type in SQL query using MS Access and OLEDB

I am using MS Access as database and using OLEDB. In database I am storing dates as strings. I can't change them in date type (I know it would be easier to work

ASP.NET MVC / Entity Framework - Controller generation is somehow using old properties

After adding and altering columns in the SQL database, I've refreshed the Entity Model (Entity Framework 6) and deleted all controllers and views, to generate t

Office.Interop.Word - app.DisplayAlerts = WdAlertLevel.wdAlertsNone; Not Disabling Alerts

I'm trying to disable read-only alerts when opening word files in C#. I initially tried app.DisplayAlerts = false. This did not work and I believe it's because

Im not able to mock ServiceBusReceivedMessage and ServiceBusMessageActions

we want to write unit-test for servicebus message trigger. we are using Azure.Messaging.ServiceBus nuget package [FunctionName("serviebustrigger")] publi

how to launch AR apps on emulator?

I'm developing an AR app using unity but I don't have an android mobile so I decided to work on an emulator and I read all documentation about it but it didn't

XAF - Stop auto save when trying to add new child in parent child view

When trying to add record in child view, it require to save the parent record. how can i stop this behavior? Look into the photo

How to convert seconds to minutes in MVC?

I get the input as a second from the user and I want to show it as minutes and second in the Grid. I know I have to use a method but I don't know how. **Seizure

.NET 6: How to use method overloading in console app Startup?

.NET 6 offers boilerplate-removal in console applications Startup class. I try to run this simple test code: Console.WriteLine("Hello, World!"); static void Te

dotnet 6 minimal API circular serialization

I am new to dotnet, trying out dotnet 6 minimal API. I have two models: namespace Linker.Models { class Link : BaseEntity { [MaxLength(2048)]

How to line up objects along a drawn line?

I try to do the following: at the bottom of the screen there is a small window for drawing a line, in the center of the screen there are objects that line up in

Is it possible to make local HTTP calls in Blazor Server?

We are using Blazor Server for our application. Some of our users have intranet rest web api's in their local environment that is not accesible from outside wor

XML deserialization not binding list of strings

I am trying to deserialize xml into c# classes. I followed some documentation and generated some c# classes using the commands xsd foo.xml & xsd foo.xsd /cl

Pass multiple parameter to Ajax from link in MVC Core

I have this link <a asp-action="goPay" asp-route-id="@item.Appid" asp-route-mem="@item.Memid" asp-route-amt="@item.Areq" asp-controller="Withdraw" class="btn