Microsoft Q&A

.NET

12,907 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

12,907 questions with .NET-related tags

Sort by: Updated
0 answers

Fix database errors in visual studio

The code for selection of a row in data grud view doesnt work for me (Microsoft visual studio 2019)

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,537 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,183 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,400 questions
asked 2023-01-30T16:21:53.3+00:00
Kenny Robby 0 Reputation points
commented 2023-01-30T16:53:02.9+00:00
AgaveJoe 17,021 Reputation points
1 answer

Referencing multiple projects with top-level statements

I have two projects A and B. Each project has a single top-level statement Program.cs file. I made the Program class visible from each project by enabling internals: <InternalsVisibleTo Include="MyTargetProject" /> The problem is that…

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,936 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
611 questions
asked 2023-01-30T16:34:45.33+00:00
Ernest 1 Reputation point
answered 2023-01-30T16:47:49.4833333+00:00
Bruce (SqlWork.com) 27,941 Reputation points
1 answer

How to fix error in visual studio 2019

The code .DataSource = ds.Tables[0]; doesn't work for me. What might be the error?? In Microsoft vs 2019

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,183 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
291 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.
8,484 questions
asked 2023-01-30T16:17:13.57+00:00
Kenny Robby 0 Reputation points
answered 2023-01-30T16:28:35.2866667+00:00
Bjoern Peters 6,691 Reputation points Microsoft MVP
0 answers

How to terminate a process cleanly from a background service

I have developed a program which runs as a Windows service. This program starts a process to run another exe file. It's developed in C# with .NET 6.0. I know I can use Process.Kill() to terminate the process, but I'd like to try to end the process…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
611 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,936 questions
asked 2023-01-30T16:28:06.2466667+00:00
Andy Reynolds 0 Reputation points
0 answers

Timespan.FromHours(24) not working after publish application on Azure app service

Hi i hi have one small simple application which logs the information. So I have one basic application which is using System.Threading.Timer and setup timer to run my function once a day and create logs. Ex. _timer = new Timer(callbackAsync, null,…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
611 questions
Azure App Service Static Web Apps
asked 2023-01-30T05:41:27.6566667+00:00
Rohan 0 Reputation points
commented 2023-01-30T16:24:35.8633333+00:00
Rohan 0 Reputation points
1 answer

"dotnet" is not recognized

I have installed a fresh Windows10, and downloaded the "dotnet-install.ps1" from Microsoft: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script And I ran it with a powershell window: > .\dotnet-install.ps1 -Channel 7.0…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
611 questions
asked 2023-01-30T14:38:11.9433333+00:00
Daniel ‪ 0 Reputation points
answered 2023-01-30T15:52:03.47+00:00
Michael Taylor 37,616 Reputation points
1 answer

xamarin android emulator android > 9 ? how to make ?

Hello all, I have vs 2022 entreprise installed on my computer all works fine with emulator below android 9 .. i can push my app , debug ans so on .. I've try to make an android 10 / 11 and so on but impossible to start it ,, Of course i have the sdk who…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,806 questions
asked 2023-01-26T09:28:50.3866667+00:00
cristopheB 476 Reputation points
answered 2023-01-30T15:42:13.55+00:00
cristopheB 476 Reputation points
2 answers

fileupload emty error !!!

Hello friends, if the file upload is empty SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Holding_DB"].ConnectionString); con.Open(); SqlCommand cmdSelect = new…

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
397 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,936 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,183 questions
asked 2023-01-30T11:57:08.06+00:00
kadir koçaslan 0 Reputation points
edited a comment 2023-01-30T15:31:53.7033333+00:00
AgaveJoe 17,021 Reputation points
0 answers

Button click event is not firing

Greetings again dear experts. I have an .aspx page with two sections One section allows our users to enter records displays existing records for update. The second allows users to preview the records, whether insert or update before submitting to the…

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
397 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,828 questions
asked 2023-01-30T04:06:30.6633333+00:00
Simflex 81 Reputation points
commented 2023-01-30T15:21:05.1566667+00:00
Simflex 81 Reputation points
1 answer One of the answers was accepted by the question author.

How can caming towns null ?

When the city is selected, it comes with the town. But when the city is selected, I want the town to be empty and for the user to select it. I want when user choose city second drowboxlist caming null how can add ? my code is ; For example…

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
397 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
588 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,183 questions
asked 2023-01-30T06:39:03.31+00:00
Harun Ergün 20 Reputation points
accepted 2023-01-30T14:58:47.01+00:00
Harun Ergün 20 Reputation points
1 answer One of the answers was accepted by the question author.

how can add validation 2 drowdownlist

The user comes and selects the city from the first dropdownlist. If the first value is selected from the second dropdownlist, I want it to give an error. I want to add validation but failed. Help me please ? Where is my mistake ? my code ; var…

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
397 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
588 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.
146 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,183 questions
asked 2023-01-30T08:28:51.2766667+00:00
Harun Ergün 20 Reputation points
accepted 2023-01-30T14:57:54.8766667+00:00
Harun Ergün 20 Reputation points
0 answers

Xamarin Form Add Multiple Binding

Please I need help. I have my Xamarin Form app that works very well with DataBinding to its View Model named OrderDetailViewModel. But today I have to add another DataBinding field in line 10 Binding OrderStatusMessage that is bind to its Xaml.cs file…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,806 questions
asked 2023-01-30T07:42:11.72+00:00
Alice 26 Reputation points
edited a comment 2023-01-30T14:09:27.5566667+00:00
Alice 26 Reputation points
1 answer One of the answers was accepted by the question author.

How can add HTML paragraph alignment

I have a paragraph with too many words in it. I want it to be left and right aligned. Like Microsoft Word (same as ctrl+D). How can I do this? First ; I want like this ; This is (Ctrl+D) Is there a parameter in html that I can do the same way? My code…

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
397 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,537 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
588 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.
146 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,183 questions
asked 2023-01-30T12:16:04.8233333+00:00
Harun Ergün 20 Reputation points
edited an answer 2023-01-30T14:07:56.5566667+00:00
Viorel 82,476 Reputation points
0 answers

Does the class returned by System.Security.Cryptography.IncrementalHash.CreateHMAC(HashAlgorithmName.SHA256) uses a managed or a native crypto implementation?

I've developed an app with Xamarin for Android and iOS which uses a sha256 hash. I need to know if the class returned by System.Security.Cryptography.IncrementalHash.CreateHMAC(HashAlgorithmName.SHA256) uses a managed or a native sha implementation…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,806 questions
asked 2023-01-30T13:49:17.2833333+00:00
Andreas Gossweiler 0 Reputation points
0 answers

MauiSplash to fill the screen

Hi, Using: <ItemGroup> <MauiSplashScreen Include="Resources\Splash\splashscreen.svg" /> </ItemGroup> How can I make the splash image to fill the screen vertically and horizontally? Thanks, Jassim

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
885 questions
asked 2023-01-25T21:51:19.36+00:00
Jassim Al Rahma 1,086 Reputation points
commented 2023-01-30T13:48:40.86+00:00
Jassim Al Rahma 1,086 Reputation points
1 answer

SAML Toolkit for C# and ASP.NET

Is there any SAML Toolkit for C# and ASP.NET? I want to integrate SAML 2.0 into my existing ASP.NET application. I have done the research for plugins/toolkits for. NET. I haven't found any from Microsoft. Please help me on this.

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,936 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,183 questions
asked 2023-01-30T13:25:03.8966667+00:00
Sai Kiran Naidu 0 Reputation points
answered 2023-01-30T13:47:19.77+00:00
Telen Wang 245 Reputation points
1 answer

How can I set environment name without building every time?

I need to set custom environment names for builds that gets deployed to different servers. From looking at official documentation and other answers elsewhere, the recommended option is to pass environment name as an argument while calling dotnet publish…

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,936 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
611 questions
asked 2023-01-30T06:30:06.68+00:00
Francis, Aswin 0 Reputation points
edited an answer 2023-01-30T13:46:36.57+00:00
Reza Aghaei 3,011 Reputation points Microsoft MVP
3 answers

Getting User Details from Azure AD in ASP.NET

In my ASP.NET 4.8 MVC application, I was able to get user authenticated using Azure AD. Now I need to get user details like job title, department, email, etc. From the research I did so far, it looks like MS Graph API is the way to go. Am I correct? Can…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
588 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,183 questions
ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
397 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,601 questions
asked 2023-01-17T14:32:53.06+00:00
Joe Green 141 Reputation points
answered 2023-01-30T13:37:28.88+00:00
Joe Green 141 Reputation points
0 answers

SsdtHelper.DeployDacPacWithOptions() fails with System.MissingMethodException: Method not found: 'Void Microsoft.SqlServer.TransactSql'

I have a .NET Framework 4.6.1 (upgrading to 4.6.2 doesn't solve it) project that uses DacServices to deploy my database's SSDT on a Docker container. This eventually uses the following code: using (var fileStream = new FileStream(dacpacPath,…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
611 questions
asked 2023-01-23T12:08:46.3933333+00:00
Ron Anoshi 0 Reputation points
edited a comment 2023-01-30T12:52:06.8+00:00
Ron Anoshi 0 Reputation points
1 answer One of the answers was accepted by the question author.

How can I use WeakReferenceMessenger instead of MessagingCenter in my iOS project?

I get the following message when I use MessagingCenter in my .NET 7.0 iOS project: [deprecated] class Microsoft.Maui.Controls.MessagingCenter Associates a callback on subscribers with a specific message name. CS0618: 'MessagingCenter' is obsolete: 'We…

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,936 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
885 questions
asked 2023-01-29T16:30:19.28+00:00
Kim Strasser 341 Reputation points
commented 2023-01-30T12:25:32.74+00:00
Kim Strasser 341 Reputation points