24,598 questions with .NET-related tags

Sort by: Updated
0 answers

System.NullReferenceException: 'Object reference not set to an instance of an object.' model was null

model { public int VehicleID { get; set; } public int VehicleTypeID { get; set; } public string Brand { get; set; } public string Model { get; set; } public int Capacity { get; set; } = 0; public bool IsActive { get; set; } } controller //…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,540 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,304 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,783 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
913 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.
10,517 questions
asked 2024-06-21T09:37:52.91+00:00
Naveinthiran 0 Reputation points
1 answer One of the answers was accepted by the question author.

System.NullReferenceException: 'Object reference not set to an instance of an object.' when trying to run new View.

Can someone please have a look at my code and help me understand why I'm getting this error? I have set up a controller and model, but when trying to run this view I get this error.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,381 questions
asked 2022-09-23T04:42:24.867+00:00
Mel 21 Reputation points
commented 2024-06-21T09:31:45.6266667+00:00
Lan Huang-MSFT 28,111 Reputation points Microsoft Vendor
2 answers

VS 2022 Not showing red squiggles under errors when i debug projects saved on network disk

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,540 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.
10,517 questions
asked 2024-06-21T05:42:45.41+00:00
Willis1962 0 Reputation points
answered 2024-06-21T09:29:13.0266667+00:00
Jing Zhou 3,815 Reputation points Microsoft Vendor
4 answers

Concern to API tool

Hi, Is there any existing API tool, to be embedded on an ASP page, to receive/send mails on the designated domain, with Email service?

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,450 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.
313 questions
asked 2024-06-18T09:07:52.09+00:00
Peter_1985 2,586 Reputation points
answered 2024-06-21T09:27:59.21+00:00
Lan Huang-MSFT 28,111 Reputation points Microsoft Vendor
1 answer

How to connect Access Database to a VB.Net project in VS 2022 using .Net 8.0?

Hi All, I am trying to use .Net 8.0 in Visual Studio 2022; I am unable to use Access Database; the usual way of adding "Data Sources" is not available ( I have been using .Net Framework 4.5 for my projects without any difficulties.) I used the…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,540 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,636 questions
asked 2024-06-20T18:51:16.6666667+00:00
VKSB 216 Reputation points
commented 2024-06-21T09:05:20.95+00:00
VKSB 216 Reputation points
1 answer

adding a column to control

I know that Maui has a new Drawing api, to help you create custom controls, but I do not know how to use it, to create a control like this but with another column to the rigth that that has tmezones (the timezones comes from api) So basicallyI need…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,073 questions
asked 2024-06-20T00:48:10.41+00:00
Eduardo Gomez Romero 225 Reputation points
answered 2024-06-21T08:58:26.3833333+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 38,061 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How can I add a video view to my iOS .NET project?

I want to play a video in my iOS .NET project. I have installed the NuGet package XamarinMediaManager version 1.2.2: https://github.com/Baseflow/XamarinMediaManager But the problem is that I only hear the sound of the video when I debug on my iPad. I…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,073 questions
asked 2024-06-12T11:59:53.5666667+00:00
Kim Strasser 726 Reputation points
accepted 2024-06-21T08:49:40.21+00:00
Kim Strasser 726 Reputation points
0 answers

Develop an ASP.NET Core web app that consumes an API - NO SCORE AT ALL

hi, after submitting my assessment score didn't show after, that was my third attempt. Microsoft Credential task: "Develop an ASP.NET Core web app that consumes an API".

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,405 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,304 questions
Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
287 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.
313 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,194 questions
asked 2024-06-21T03:01:09.4366667+00:00
David Jugeli 0 Reputation points
edited a comment 2024-06-21T08:48:50.89+00:00
Tiny Wang-MSFT 2,091 Reputation points Microsoft Vendor
2 answers

ZipFile.OpenZip(zipFilePath) not working in mac

Hi, ZipFile.OpenZip(zipFilePath) not working in mac. ........ }).ContinueWith(async task2 =>                                 { if (LoginConfigurations.GetInstance().DownloadExtractFileType == "flatten"){  string zipFilePath =…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,073 questions
asked 2024-06-20T11:42:01.5333333+00:00
Dani_S 3,106 Reputation points
commented 2024-06-21T08:39:52.69+00:00
Dani_S 3,106 Reputation points
1 answer

Problem with rewrite the Backgrounding event

Hi, In continue to https://learn.microsoft.com/en-us/answers/questions/1690214/register-close-button-in-mac All my work in pages stop working. Working with http + tasks. it fire the close button event and close the app. Thanks in advance,

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,073 questions
asked 2024-06-18T06:41:00.6+00:00
Dani_S 3,106 Reputation points
edited a comment 2024-06-21T08:10:50.7933333+00:00
Dani_S 3,106 Reputation points
1 answer

Issue with View ActionResult on Button Click in MVC 5

The following code works fine and display student enrollment records on the page. Right before the table element, I have 3 buttons to filter out records based on the button that was clicked. In the controller, I added a function "IsEnrolled". …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,304 questions
asked 2024-06-21T05:39:46.3533333+00:00
Hursh 131 Reputation points
edited an answer 2024-06-21T07:54:28.1033333+00:00
Tiny Wang-MSFT 2,091 Reputation points Microsoft Vendor
1 answer

My EmailConfirmed is not working

Hi, I'm new to this, so I'm not so good, your help is my pleasure, thank you. I am having a problem with login, the API emailConfirmed still works when I give it token and userId. As far as I know, the EmailConfirmed doesn't confirm itself. I think I…

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
639 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
713 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,304 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.
10,517 questions
asked 2024-06-20T20:04:22.7933333+00:00
Nhựt Lại 25 Reputation points
edited an answer 2024-06-21T07:47:25.6066667+00:00
Ping Ni-MSFT 2,875 Reputation points Microsoft Vendor
0 answers

Why am I asked to update Azure Cosmos DB .NET SDK to version 3 by 31 August 2024? We've never been using version 2 to the best of my knowledge.

Hi, I've received the following email: Update to version 3 of the Azure Cosmos DB .NET SDK by 31 August 2024 You're receiving this email because you've used version 2.x of the Azure Cosmos DB .NET SDK. Because version 3 of the Azure Cosmos DB .NET SDK…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,540 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,502 questions
asked 2024-06-21T07:09:27.79+00:00
Oleg 1 Reputation point
2 answers

Stored Procedure not updating in edmx

Adding or updating a stored procedure in the EDMX file is currently not functioning as expected in the latest version of Visual Studio.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,540 questions
asked 2024-06-06T10:57:27.7366667+00:00
Mohit Sharma 0 Reputation points
commented 2024-06-21T06:56:07.4033333+00:00
Hongrui Yu-MSFT 690 Reputation points Microsoft Vendor
2 answers

How to fix slower performance with Microsoft.Data.SqlClient.TdsParserStateObject ReadSniSyncOverAsync method?

How to fix slower performance with Microsoft.Data.SqlClient.TdsParserStateObject ReadSniSyncOverAsync method when it has multiple calls (21) in a transaction with average execution time of 6116 ms per call and totalling to 128436 ms?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,540 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.
13,111 questions
asked 2024-06-13T09:10:47.4366667+00:00
ShahSamir-9495 0 Reputation points
commented 2024-06-21T06:51:13.3233333+00:00
MikeyQiaoMSFT-0444 1,255 Reputation points
1 answer

How to reference global resources in user controls in wpf class library projects

I created a WPF class library, and then added a UserControl "Card.xaml", and a resource dictionary "GlobalRes.xaml", I hope to use the style resources in GlobalRes in the Card control. As shown…

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,699 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.
10,517 questions
asked 2024-06-21T05:17:59.38+00:00
HoWe Yu 41 Reputation points
answered 2024-06-21T06:28:41.0333333+00:00
Hongrui Yu-MSFT 690 Reputation points Microsoft Vendor
2 answers

Combine 2 Solutions in to 1

I have 2 separate MVC applications (Project1.sln, Project2.sln) using Entity Framework in VS 2019. Both applications work fine if the project/solution is loaded separately. When I add Project2 in Project1, I get a long list of errors. What's the best way…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,381 questions
asked 2024-06-12T05:31:39.46+00:00
Malam Malam 226 Reputation points
commented 2024-06-21T06:06:50.5633333+00:00
Lan Huang-MSFT 28,111 Reputation points Microsoft Vendor
2 answers

aspx update button not updating all fields

I have an update button and when clicked, it updates all the fields in my sql table except for the "Channel" field. protected void btnupdate_Click(object sender, EventArgs e) { if (TextBox1.Text != "" &&…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,381 questions
asked 2024-06-20T14:40:27.4766667+00:00
Walter Graulich 0 Reputation points
commented 2024-06-21T06:04:02.5866667+00:00
Lan Huang-MSFT 28,111 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to Preselect in the Nested List View MAUI?

TRAIL.XAML <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,073 questions
asked 2024-06-20T18:29:26.79+00:00
Sowndarrajan Vijayaragavan 410 Reputation points
commented 2024-06-21T05:56:22.43+00:00
Sowndarrajan Vijayaragavan 410 Reputation points
1 answer

Cancellation Token signal not being received by the application code

looks like there is a limitation as it can be read here https://github.com/dotnet/aspnetcore/issues/20229#issuecomment-623289191 https://learn.microsoft.com/en-us/answers/questions/391343/cancellationtoken-in-controller-endpoint-hosted-in but is there…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,304 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,381 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.
10,517 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.
313 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,194 questions
asked 2024-06-20T19:01:11.7333333+00:00
Michel Fornaris 0 Reputation points
answered 2024-06-21T05:55:30.81+00:00
SurferOnWww 2,171 Reputation points