Microsoft Q&A

ASP.NET MVC

608 questions

A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.

Browse all .NET tags

517 questions with ASP.NET MVC tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

Identity Scaffolding Context class

Should the existing context class be chosen at projectname.data. or a second context class be created at projectname.areas.identity.data.WebApplication1Context. Confused about the wording in the tutorial: "create a new Data context class. Accept the…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
asked 2023-02-03T14:25:12.16+00:00
Dean Everhart 441 Reputation points
commented 2023-02-03T15:58:16.0933333+00:00
Dean Everhart 441 Reputation points
1 answer One of the answers was accepted by the question author.

embedding a pdf file in my chrome browser

I am trying to embed a pdf file on my web page. In order to achieve this, I have the following code in my controller: public IActionResult Index() { string path = Path.Combine(_environment.WebRootPath, "packageFiles"); …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
asked 2023-02-03T04:57:40.42+00:00
Anjali Agarwal 101 Reputation points
accepted 2023-02-03T15:25:16.3233333+00:00
Anjali Agarwal 101 Reputation points
2 answers

How to create environments with appSettings?

In previous projects i could click the Configuration or Debug menu (in the top bar) and set a new Configuration. This was displayed when i expanded web.config and i could use this to change environments to use different database connection strings…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 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,991 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
623 questions
.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
484 questions
asked 2023-02-03T09:02:57.8733333+00:00
Mr Edge 121 Reputation points
commented 2023-02-03T15:13:25.68+00:00
Karen Payne MVP 29,236 Reputation points Microsoft MVP
1 answer One of the answers was accepted by the question author.

Paginated List not displaying second page

The below works to display the first page containing 3 records of 6 of a paginated list but when you click on the "Next" button, it has the following result: [https://localhost:7045/PropertySet01?pageNumber=2 This localhost page can’t be…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
asked 2023-01-18T22:23:08.27+00:00
Dean Everhart 441 Reputation points
accepted 2023-02-03T14:06:21.98+00:00
Dean Everhart 441 Reputation points
1 answer One of the answers was accepted by the question author.

I'm getting code first approach validation error can you help me

I add error massege and I update database with (datanase-update -Force).but not working error massege. why ?

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,200 questions
asked 2023-01-31T13:51:55.46+00:00
Harun Ergün 120 Reputation points
accepted 2023-02-03T07:42:36.6433333+00:00
Harun Ergün 120 Reputation points
2 answers One of the answers was accepted by the question author.

Visual Studio - installing chartjs-plugin-datalabels

I have already installed chart.js nuget into my MVC app. Now I am trying to add tatals to each of my chart bars and in order to do so, according to many tutorials, I should install chartjs-plugin-datalabels but when I am trying to execute the following…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
701 questions
asked 2023-01-10T20:25:22.807+00:00
JStus 41 Reputation points
edited the question 2023-02-03T07:35:29.29+00:00
Tianyu Sun-MSFT 13,076 Reputation points Microsoft Employee
1 answer

Server Error in '/' Application Error.

Hi There; I have an ASP.NET MVC Application. Its version is .NET 4.5.2. It is facilitating Entity Framework and it is using Oracle Database 19c. I have found a bug in the application and I solve it. It runs smoothly on my local computer. Whenever I…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
623 questions
Internet Information Services
Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
218 questions
asked 2023-02-02T08:30:56.1066667+00:00
Taha Sözgen 5 Reputation points
answered 2023-02-03T07:31:22.74+00:00
Sam Wu-MSFT 5,291 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

Linq query and violation of inserting null in database

Hello All, I have the following two model classes: public partial class EmployeeInfo { public int EmployeeInfoId { get; set; } public string LastName { get; set; } = null!; [DisplayName("First Name")] public string FirstName { get; set; } =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 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,991 questions
asked 2023-01-31T01:42:14.5866667+00:00
Anjali Agarwal 101 Reputation points
accepted 2023-02-03T04:58:37.07+00:00
Anjali Agarwal 101 Reputation points
1 answer One of the answers was accepted by the question author.

Address Autocomplete

Hello everyone and thanks for the help in advance. I need to develop a page for address input that will be entered by an end user. Obviously, user input is prone to error so I am looking for solutions to validate the input. I know the US Postal…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
asked 2023-02-02T02:18:07.7633333+00:00
Kmcnet 201 Reputation points
accepted 2023-02-03T02:32:59.3666667+00:00
Kmcnet 201 Reputation points
1 answer

Add-Migration CreateIdentitySchema

Having difficulty with the Add-Migration CreateIdentitySchema step in the tutorial. Any help would be appreciated: Tutorial:…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 questions
asked 2023-02-02T19:03:35.49+00:00
Dean Everhart 441 Reputation points
answered 2023-02-03T00:53:01.0933333+00:00
SurferOnWww 636 Reputation points
2 answers One of the answers was accepted by the question author.

Auth cookie is deleted by the browser when it closes

I have a strange problem. When I close my browser (whether Chrome or MS Edge), my authentication cookie is deleted. Consequently, the next time I start the browser, I have to log in again. My controller looks like this: ClaimsIdentity claimsIdentity =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 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,991 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 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.
792 questions
asked 2023-01-31T19:34:06.25+00:00
perfect code 161 Reputation points
commented 2023-02-02T18:52:06.9266667+00:00
perfect code 161 Reputation points
2 answers One of the answers was accepted by the question author.

Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design Error 6.0 v 7.0

Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design renders following error message: PM> install-package microsoft.VisualStudio.Web.CodeGeneration.Design Restoring packages for…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
asked 2023-02-01T18:59:18.8533333+00:00
Dean Everhart 441 Reputation points
commented 2023-02-02T13:15:56.79+00:00
Dean Everhart 441 Reputation points
1 answer One of the answers was accepted by the question author.

how to bind to taghelper property in razor pages?

[HtmlTargetElement("pagination")] public class PaginationTagHelper : TagHelper { [HtmlAttributeName("page-index")] public int PageIndex{get;set;} } and in Index.cshtml <pagination page-index="PageIndex" /> I can not…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 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.
407 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
asked 2023-01-30T05:36:04.64+00:00
打玻璃 1,526 Reputation points
accepted 2023-02-01T09:45:37.13+00:00
打玻璃 1,526 Reputation points
2 answers

Reading form fields after submit (POST) in Blazor Server?

I have a login form in Blazor Server App and use POST to send login data (email and password). <form id="LoginForm" Model="LoginModel" action="cookie" method="post"> …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,578 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,991 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 questions
asked 2023-01-28T19:43:14.55+00:00
perfect code 161 Reputation points
commented 2023-02-01T01:34:52.0566667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 11,296 Reputation points Microsoft Employee
4 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.
608 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,200 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.
407 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,701 questions
asked 2023-01-17T14:32:53.06+00:00
Joe Green 141 Reputation points
answered 2023-01-31T10:32:49.04+00:00
Shweta Mathur 11,081 Reputation points Microsoft Employee
1 answer

How to System.BadImageFormatException (No string associated with token) error solved

Our Web Application build in .NET 4.8 and hosted as an azure app service throws this exception in some views. Here is the stack trace for one of these exceptions. We have run out of options to try certain things but it is stuck like that. We have tried…

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,991 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
957 questions
Internet Information Services
asked 2023-01-28T13:47:57.62+00:00
Tabish Ashraf 0 Reputation points
commented 2023-01-31T09:33:10.1533333+00:00
JasonPan - MSFT 1,146 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

"Güncelle" button not working

ı dont undestand. Delete's working but update(Güncelle) not working. Where's my mistake ?

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.
407 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 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.
148 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,200 questions
asked 2023-01-31T06:19:44.85+00:00
Harun Ergün 120 Reputation points
edited a comment 2023-01-31T08:53:25.92+00:00
Viorel 82,746 Reputation points
2 answers

Sodium.js error

Does anyone know what is sodium.js and what is this error means? This error started showing in my asp.net MVC app. I have autocomplete on my text field which uses json call which queries database and I've noticed that even the autocomplete works,…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,200 questions
asked 2023-01-27T19:24:15.99+00:00
Joe Green 141 Reputation points
answered 2023-01-30T18:10:53.3066667+00:00
Joe Green 141 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.
407 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,200 questions
asked 2023-01-30T06:39:03.31+00:00
Harun Ergün 120 Reputation points
accepted 2023-01-30T14:58:47.01+00:00
Harun Ergün 120 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.
407 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
608 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.
148 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,200 questions
asked 2023-01-30T08:28:51.2766667+00:00
Harun Ergün 120 Reputation points
accepted 2023-01-30T14:57:54.8766667+00:00
Harun Ergün 120 Reputation points