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

189 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
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 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
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
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
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
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
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
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
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
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,200 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
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
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
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.
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
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-01-30T12:16:04.8233333+00:00
Harun Ergün 120 Reputation points
edited an answer 2023-01-30T14:07:56.5566667+00:00
Viorel 82,746 Reputation points
1 answer One of the answers was accepted by the question author.

the taghelper do not rendered?

using Microsoft.AspNetCore.Razor.TagHelpers; namespace tag.Components { [HtmlTargetElement("pagination", TagStructure = TagStructure.WithoutEndTag)] public class PaginationTagHelper : TagHelper { …

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
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
asked 2023-01-28T01:27:55.3233333+00:00
打玻璃 1,526 Reputation points
accepted 2023-01-30T07:50:24.4733333+00:00
打玻璃 1,526 Reputation points
1 answer One of the answers was accepted by the question author.

How to remove validation-info in text?

in Index.cshtml <form> <div class="row"> <div class="col-sm-2"> <label class="col-form-label">客户:</label> <div> …

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-27T12:33:03.2066667+00:00
打玻璃 1,526 Reputation points
accepted 2023-01-30T07:28:47.4566667+00:00
打玻璃 1,526 Reputation points
3 answers One of the answers was accepted by the question author.

when user if user leaves blank any step cursor to where error is taken (jquery)

when user if user leaves blank any step cursor to where error is taken For Example var name = $('#name').val(); if (name == '') { $('#name').css('border-color', 'red'); alert('Please write your first and last name') return false; } else…

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-24T06:12:55.2933333+00:00
Harun Ergün 65 Reputation points
edited the question 2023-01-30T02:22:04.0733333+00:00
Lan Huang-MSFT 9,201 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

Generate a simple message from controller (blazor page not for razor view)

In a Blazor server application, I have implemented user authentication via cookie. In the Blazor page (not razor view) I have created a form with email and password entries as well as a button for sending the data. The method is Post and is run on 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
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
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
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-29T12:11:47.5833333+00:00
perfect code 161 Reputation points
accepted 2023-01-29T15:19:10.56+00:00
perfect code 161 Reputation points
2 answers One of the answers was accepted by the question author.

Logout (delete Auth-Cookie) only possible via form!

I have a Blazor server application (see my post here: https://learn.microsoft.com/en-us/answers/questions/1164837/aspnet-authentication-works-but-value-for-user-ide). Now I have implemented a cookie authentication. This works very well via a login and…

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
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
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
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-28T13:26:22.5033333+00:00
perfect code 161 Reputation points
commented 2023-01-28T17:41:48.8333333+00:00
perfect code 161 Reputation points
1 answer One of the answers was accepted by the question author.

What is the difference of = and {get;set;}?

public int PageIndex{get;set;}=0; public int PageIndex=0; what is the difference?

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-27T14:03:05.81+00:00
打玻璃 1,526 Reputation points
accepted 2023-01-28T01:08:55.3866667+00:00
打玻璃 1,526 Reputation points