Microsoft Q&A

ASP.NET Core

2,563 questions

A set of technologies in the .NET Framework for building web applications and XML web services.

Browse all .NET tags

785 questions with ASP.NET Core tags

Sort by: Updated
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,563 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.
790 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,976 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
599 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 MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
599 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 questions
asked 2023-02-01T18:59:18.8533333+00:00
Dean Everhart 401 Reputation points
commented 2023-02-02T13:15:56.79+00:00
Dean Everhart 401 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,563 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.
405 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
599 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.

Implementing SignalR in ASP.NET Core Web App (MVC) for real-time database updates

Hi All, I am still a bit green with C# and ASP.NET however I have created a ASP.NET Core Web App (MVC) .NET6, that displays an IOT temperature sensor reading summary dashboard and another page that displays the readings and other information about each…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 questions
Azure SignalR Service
Azure SignalR Service
An Azure service that is used for adding real-time communications to web applications.
73 questions
asked 2023-01-11T13:00:50.5266667+00:00
ChrisU 111 Reputation points
accepted 2023-01-31T09:58:08.98+00:00
ChrisU 111 Reputation points
2 answers One of the answers was accepted by the question author.

.NET Core API Framework Warning

Hi All, I am developing an application using .NET Core with angular client. I am exporting the data to excel and generating the file in C# .NET Core. I am using a nuget package for the same. After installing the nuget package in the project I am getting…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 questions
asked 2023-01-27T14:03:43.83+00:00
Pratham Jain 81 Reputation points
answered 2023-01-31T09:27:25.62+00:00
Srivastava, Prashant 1 Reputation point
1 answer One of the answers was accepted by the question author.

Download Files in Razor Pages without submitting the form (Edit page)

Hi, I want to download my uploaded files in razor pages edit screen. I dont want to submit the form or refresh the page upon clicking on the download button. Could anyone please advice me how to acheive this?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 questions
asked 2022-01-31T01:57:06.32+00:00
Blooming Developer 196 Reputation points
commented 2023-01-30T23:50:23.35+00:00
1337DOMINATOR228 0 Reputation points
2 answers One of the answers was accepted by the question author.

Displaying Deserialized JSON Data In Razor Page

Hello Everyone, I am using Visual Studio 2022 (x64) Community Version Entity Framework Core 6 C# Razor Pages (Not MVC) I am pulling data from the Google YouTube API, and want to display it on a .cshtml page. Here is a sample of the data: { …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 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,976 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,430 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.
147 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,195 questions
asked 2023-01-30T02:39:33.7466667+00:00
Brian Ashcraft 20 Reputation points
commented 2023-01-30T22:52:28.9233333+00:00
Brian Ashcraft 20 Reputation points
4 answers One of the answers was accepted by the question author.

c# use tablename as variable

How can i use tablename as a variable in sql query? "select * from table_name " table_name must be variable.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 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,976 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,539 questions
asked 2023-01-30T06:44:59.1066667+00:00
ÖMER NASUHİ KESKİN 20 Reputation points
answered 2023-01-30T22:25:01.1933333+00:00
Erland Sommarskog 67,821 Reputation points Microsoft MVP
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 Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
599 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.
147 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,195 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.
405 questions
asked 2023-01-30T12:16:04.8233333+00:00
Harun Ergün 100 Reputation points
edited an answer 2023-01-30T14:07:56.5566667+00:00
Viorel 82,741 Reputation points
1 answer One of the answers was accepted by the question author.

how to get parameter name in c#?

public string BuildParameter(object[] para) { var parameters = ""; for (var i = 0; i < para.Length; i++) { if (para[i] != null) { …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
291 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
614 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.
956 questions
.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
482 questions
asked 2023-01-30T05:50:44.7+00:00
打玻璃 1,526 Reputation points
accepted 2023-01-30T09:17:44.13+00:00
打玻璃 1,526 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,563 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.
405 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
599 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,563 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.
405 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
599 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
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,563 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.
790 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,976 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
599 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
1 answer One of the answers was accepted by the question author.

How to use EF Core when two properties in the Principle entity point to the same attribute in the dependent entity?

I have 2 Model classes: Department.cs cs public class Department { public string DepartmentId { get; set; } public string Name { get; set; } public string Description { get; set; } [ForeignKey("FacultyId")] public…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
424 questions
asked 2021-11-01T04:16:37.687+00:00
Uchchay Dugal 21 Reputation points
accepted 2023-01-29T15:05:43.83+00:00
Uchchay Dugal 21 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,563 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.
790 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,976 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
599 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-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
2 answers One of the answers was accepted by the question author.

Downgrade ASP.NET Core app from .NET 6.0 to .NET Core 3.1

I have made an ASP.NET Core web application, using .NET 6.0. However, when I obtained a hosting server, I learnt that my hosting provider has installed .NET 5.0. As a result, I now have to downgrade my project from .NET 6.0 to a previous version.…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 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.
790 questions
asked 2022-09-17T11:44:11.667+00:00
PPCMD 61 Reputation points
accepted 2023-01-28T12:04:03.31+00:00
PPCMD 61 Reputation points
6 answers One of the answers was accepted by the question author.

How to show a loading prompt in view before the controller loaded the data?

With asp.net core 6.0 mvc It needs several seconds to load data in controller,before that ,how to show a loading promt in the view?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 questions
asked 2022-05-23T03:27:10.04+00:00
Alick Wang 21 Reputation points
accepted 2023-01-28T09:02:25.6233333+00:00
Alick Wang 21 Reputation points
1 answer One of the answers was accepted by the question author.

How to ignore ETag checking and fix this error

I read from and write to blob content in Azure blob storage. File is being changed (new content is getting appended to the file) at the same time while it is being downloaded. I get error in the below stream.Read() line. Which I believe is because of…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 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.
790 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,976 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
1,403 questions
asked 2023-01-18T12:50:17.69+00:00
Sarah 156 Reputation points
accepted 2023-01-28T07:59:17.6133333+00:00
Sarah 156 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,563 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.
405 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
599 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
1 answer One of the answers was accepted by the question author.

ASPNET authentication works but value for user.Identity.Name is null

I get a null value for user.Identity.Name, but user.Identity.IsAuthenticated returns the correct value. I get my claim values too. I have only found a few posts about user.Identity.Name is null, but nothing has solved it. I have a simple login form: …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,563 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.
790 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,976 questions
asked 2023-01-27T14:29:56.4566667+00:00
perfect code 161 Reputation points
commented 2023-01-27T15:41:38.02+00:00
perfect code 161 Reputation points