Microsoft Q&A

.NET

20,748 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

20,748 questions with .NET-related tags

Sort by: Updated
2 answers

LINQ and VB 2015 : Select Distinct in Sub-List of Objects...

Hi, this is a simple example about my task. I have a List of Objects, let's say a group of Persons and each Person has a Property which is a List of other type of Objects, let's say Colors. I'd like to get a Distinct List of all Colors kept by all…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,071 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,321 questions
asked 2023-09-28T15:16:16.5533333+00:00
Marco Gregori 41 Reputation points
commented 2023-10-03T02:49:38.2166667+00:00
Jiachen Li-MSFT 19,936 Reputation points Microsoft Vendor
1 answer

How to reduce font size based on Textblock size

Hi All, I have a Textblock inside WPF grid which can span to 1 to n rows based on some conditions. When Textblock is spanned to two or more rows it mostly displays the text completely due to textwrapping set to "wrap". But when Textblock is…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,484 questions
asked 2023-10-02T14:32:18.0866667+00:00
Pratham Jain 181 Reputation points
edited an answer 2023-10-03T02:47:34.7466667+00:00
Hui Liu-MSFT 21,616 Reputation points Microsoft Vendor
1 answer

How to create popup window that display Product Details ?

Hi friends! I have a DataGrid that contains a list of product . when i click on a product i should open a popup windows that contains Product's details and i would modify the Price in it for example. I implement a GlobalUsing.cs such : global using…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,878 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.
9,030 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.
695 questions
asked 2023-10-02T14:07:46.96+00:00
Kaouthar GR AOUICHAOUI 0 Reputation points
answered 2023-10-03T02:46:22.6033333+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 54,321 Reputation points Microsoft Vendor
1 answer

How to detect mouse clicks and get the component that was clicked anywhere in Visual Studio?

I'm trying to capture mouse clicks from all components in the Visual Studio in order to get information about the component that was clicked on. For example, I want to detect if a user clicked anywhere in the Solution Explorer, or if the user clicked…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,484 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.
9,030 questions
asked 2023-10-02T07:21:15.0433333+00:00
stella 0 Reputation points
edited the question 2023-10-03T02:24:35.1933333+00:00
Jiale Xue - MSFT 11,416 Reputation points Microsoft Vendor
0 answers

HTTP Error 500.32 - ANCM Failed to Load dll

I have upgraded a .NET Core 2.1 web app to .NET 7. The application works fine on Visual Studio 2022. When I deploy that to Azure through Azure DevOps pipelines, I get the following error: HTTP Error 500.32 - ANCM Failed to Load dll Common solutions to…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,071 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,588 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
5,668 questions
asked 2023-10-02T21:58:13.0866667+00:00
Alexander Angelo 6 Reputation points
commented 2023-10-03T02:02:33.67+00:00
Brando Zhang-MSFT 2,241 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

getting the data from two different tables in a list

I have following two tables Employee and file Path Employee - employeeId is primary key with Identity specification EmployeeId FirstName lastName 1 Mario Gonazales 2 Mario2 Gonazales2 3 …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,588 questions
asked 2023-10-02T05:58:07.0766667+00:00
Anjali Agarwal 1,061 Reputation points
accepted 2023-10-03T01:51:47.6966667+00:00
Anjali Agarwal 1,061 Reputation points
2 answers

which is better use data reader ado.net technology or entity framework core 7 ?

I work on blazor application server side I design web API to interact with razor pages my issue is which is suitable for my scenario using ado.net or entity framework core what I try as below : [HttpGet] …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,588 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.
1,114 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,643 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,015 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.
9,030 questions
asked 2023-10-02T22:47:53.42+00:00
Ahmed Abd El Aziz 285 Reputation points
answered 2023-10-03T01:37:16.5+00:00
SurferOnWww 1,136 Reputation points
0 answers

Como enviar datos de la variable del back al front

Como enviar la variable del back al front, ya que como lo tengo me marca error no lo reconoce. Back string Id_Hub_CFDI = "SORIANA2000"; Como enviar la variable del back al front <scrip> var Id_Hub_CFDI_Ent =…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,643 questions
asked 2023-10-02T15:00:22.0066667+00:00
roberto chavarria 0 Reputation points
commented 2023-10-03T01:24:42.6766667+00:00
Lan Huang-MSFT 17,956 Reputation points Microsoft Vendor
1 answer

Three material Design TextBoxes inside one MaterialDesignFloatingHintTexbox in WPF

I have a MaterialDesignFloatingHintTextBox which displays a "Date of Birth" hint to my users when it is empty. Here is what I want to implement: the TextBox to display three TextBoxes to the user when clicked in like this, so that my users…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,484 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,822 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.
9,030 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.
695 questions
asked 2023-10-02T08:44:28.02+00:00
Mesh Ka 140 Reputation points
answered 2023-10-02T22:42:43.99+00:00
gekka 1,111 Reputation points MVP
1 answer One of the answers was accepted by the question author.

How to display autocomplete result id on first line and name on second line and designation to third line instead of using slash ?

I work on asp.net MVC web API . I face issue when call web API using jQuery ajax request my issue is autocomplete result display separated by slash Id - Name - Designation but expected result I need to get is : Id : 121 Name : michel nicol Designation :…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
989 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
243 questions
asked 2023-09-22T23:54:26.29+00:00
Ahmed Abd El Aziz 285 Reputation points
accepted 2023-10-02T22:33:30.23+00:00
Ahmed Abd El Aziz 285 Reputation points
0 answers

Binding library with xcfranework

How to use xcframework in xamarin ios binding library

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,163 questions
asked 2023-10-02T22:28:48.4033333+00:00
Rishabh Pandey 0 Reputation points
2 answers

How to create a Splash screen on Andriod

Hi, What is the easiest way to create a Splash screen for my Xamarin project. I can't get it to work. Now my app won't work at all. Some help would be appreciated.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,163 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.
9,030 questions
asked 2023-10-02T12:34:56.0733333+00:00
Matthew Zoljan 80 Reputation points
edited an answer 2023-10-02T22:28:40.4166667+00:00
Graham McKechnie 241 Reputation points
1 answer One of the answers was accepted by the question author.

Unable to add data into SQL table - exception thrown, but query works OK

I created a temp table in Server Management Studio, and imported it into my application using Scaffol-DbContext ` Scaffold-DbContext 'Data Source=MyServer;Initial Catalog=MyCatalog;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
591 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,071 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,015 questions
asked 2023-10-01T22:54:03.6033333+00:00
Robert Salasidis 131 Reputation points
accepted 2023-10-02T21:49:12.0833333+00:00
Robert Salasidis 131 Reputation points
0 answers

How to protect Net.Core server from malicious content uploads by users?

Hi! I have a website where on certain pages the user can (through checks in the controller method): To save (upload to server) text in text fields and to CKEditor. To save (upload to server) images (.jpg) to website through CKEditor and through …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,588 questions
asked 2023-10-01T15:31:24.0033333+00:00
Volk Volk 301 Reputation points
commented 2023-10-02T21:49:02.0766667+00:00
Bruce (SqlWork.com) 44,811 Reputation points
1 answer

best practice for Application Insights with Blazor Server

i have seen multiple posts about Blazor Web Assembly and Application Insights but almost zero on how to best use application insights with Blazor server. is the only way to treat blazor server like web assembly ? are there any guides on how to get full…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,588 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.
1,114 questions
asked 2023-10-02T18:35:53.3266667+00:00
Denny Figuerres 0 Reputation points
answered 2023-10-02T21:00:43.61+00:00
Bruce (SqlWork.com) 44,811 Reputation points
1 answer

Does Visual Studio 2022 support connection to Xamarin.iOS build machines running Xcode 15?

Even though the release notes for VIsual Studio 2022 version 17.7.3 (I'm running 17.7.4) say "Added support to list simulators and devices with Xcode 15", I get a warning that says, "The Xcode version installed on the Mac (15.0) is not…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,163 questions
asked 2023-10-02T19:55:32.9966667+00:00
Sibalik, Mike 6 Reputation points
answered 2023-10-02T20:48:11.9933333+00:00
Bruce (SqlWork.com) 44,811 Reputation points
2 answers

How to set default query string parameter value for webapi?

May I know how to set a default query string value for webapi in .NET 6? Example code: [HttpGet] public Greeting Greeting(string name) { return $"Hello {name}!"; } The name parameter needs to have a default value, if I use string name…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,588 questions
asked 2022-01-20T15:16:50.787+00:00
San Me 1 Reputation point
commented 2023-10-02T20:32:14.25+00:00
Henry Alonso Rojas Alvarez 0 Reputation points
1 answer

ASP.NET Core MVC: Unable to set focus on input element on view load

I am trying to set focus using javascript on the first unfocused input element of MVC view in a load window event listener. But element is focused only after page reloading. Attached browser - MS Edge I tried reloading the page programmatically using…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,588 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
694 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
989 questions
asked 2023-09-24T21:57:19.01+00:00
Stanislav Panferov 45 Reputation points
commented 2023-10-02T20:09:46.5566667+00:00
Stanislav Panferov 45 Reputation points
2 answers One of the answers was accepted by the question author.

EF Core: Map multiple c# classes to DB table

Hello, I have a DB table named JobPosting with 60 columns. I'd like to have 2 c# entities JobPostingFull & JobPostingLite which both reference the JobPosting table. The JobPostingFull class has all columns from the DB, the JobPostingLite class has…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
591 questions
asked 2023-09-30T14:36:07.7+00:00
Satish Cherian 0 Reputation points
accepted 2023-10-02T19:35:53.1966667+00:00
Satish Cherian 0 Reputation points
0 answers

Is there a way to automate adding the FullText Index to an Entity Framework migration

Hi all; Yes I can add the script to the Migration.Up() everytime I revise my model. But that is fundamentally no different from having a CreateIndexes.sql that I just run in SSMS after creating a DB. Is there some way to declare the full text indexes in…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
591 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,015 questions
asked 2023-10-01T21:18:20.5333333+00:00
David Thielen 1,426 Reputation points
commented 2023-10-02T18:55:10.99+00:00
David Thielen 1,426 Reputation points