Microsoft Q&A

ASP.NET MVC

579 questions

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

Browse all .NET tags

579 questions with ASP.NET MVC tags

Sort by: Updated
0 answers

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,524 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.
390 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-28T01:27:55.3233333+00:00
打玻璃 1,426 Reputation points
commented 2023-01-28T07:54:24.9066667+00:00
打玻璃 1,426 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 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.
390 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,524 questions
asked 2023-01-27T14:03:05.81+00:00
打玻璃 1,426 Reputation points
accepted 2023-01-28T01:08:55.3866667+00:00
打玻璃 1,426 Reputation points
7 answers

Unable to Resolve Scaffolding Issue in ASP.NET Core MVC Application

I'm getting the following error when I try to scaffold the Login, Logout, and Register pages. I ran the Visual Studio Installer to and clicked on the ASP.NET web development workflow to ensure I have all of the required tools installed. Version…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,524 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 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,389 questions
asked 2023-01-25T03:05:53.0133333+00:00
Xenu 0 Reputation points
commented 2023-01-27T21:32:58.8533333+00:00
Xenu 0 Reputation points
1 answer

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.
579 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,174 questions
asked 2023-01-27T19:24:15.99+00:00
Joe Green 141 Reputation points
answered 2023-01-27T20:43:37.8166667+00:00
Bruce (SqlWork.com) 27,936 Reputation points
1 answer One of the answers was accepted by the question author.

How to use Service Principal/Managed Identities to access Azure App Configuration from .NET Framework Application?

I need to disable Local Authentication Methods (Access Keys) for Azure App Configuration Stores. Currently for an ASP.NET Framework application, I am using the following for accessing the App Configuration Store from my…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 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,914 questions
Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
186 questions
asked 2023-01-12T12:30:34.1466667+00:00
Aayush Suresh Jain 21 Reputation points
accepted 2023-01-27T17:00:03.9033333+00:00
Aayush Suresh Jain 21 Reputation points
1 answer One of the answers was accepted by the question author.

How to change value of input field in a strongly-typed view from controller

Hello I am using ASP.NET Core 3.1 How can I change the value of the input fields in a strongly-typed view from controller. I have this simple example. I have three input fields and when the usee enters some values and submit them, I modify the values the…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,524 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-27T11:07:27.1466667+00:00
Jeddah 86 Reputation points
commented 2023-01-27T14:26:50.3766667+00:00
Jeddah 86 Reputation points
0 answers

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,524 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.
390 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-27T12:33:03.2066667+00:00
打玻璃 1,426 Reputation points
commented 2023-01-27T12:42:05.3866667+00:00
AgaveJoe 16,786 Reputation points
1 answer One of the answers was accepted by the question author.

How to use HttpContext or Claims in __Layout.cshtml?

I am using asp.net core 7.0 how to get UserClaims in Pages/Shared/_Layout.cshtml ? I do not want to use ViewData because I have to set it in each page.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,524 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.
390 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-27T07:05:48.23+00:00
打玻璃 1,426 Reputation points
accepted 2023-01-27T12:30:12.55+00:00
打玻璃 1,426 Reputation points
2 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 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.
390 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,560 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,174 questions
asked 2023-01-17T14:32:53.06+00:00
Joe Green 141 Reputation points
edited an answer 2023-01-27T08:04:51.4433333+00:00
Givary-MSFT 11,336 Reputation points Microsoft Employee
2 answers

MFA\2FA website authentication

would like to setup MFA authentication for users accessing my site on the internet. is there a way to embedd in my web site a start up code is there any solution ready for that perpse the site is public , so meany clients can ping it so ...

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,524 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,174 questions
asked 2023-01-25T08:21:43.1+00:00
Eyal 0 Reputation points
edited an answer 2023-01-27T05:38:42.4666667+00:00
SurferOnWww 636 Reputation points
1 answer One of the answers was accepted by the question author.

What is Best Practice for where to place Javascript for a View

In my views, if I need to include Javascript for that specific view only, I will code the page, then just place the Javascript at the bottom, like this: <div class="blabla" onclick="bleep()"></div> <script…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-25T18:59:22.02+00:00
Coreysan 801 Reputation points
commented 2023-01-26T18:24:34.4733333+00:00
Coreysan 801 Reputation points
3 answers One of the answers was accepted by the question author.

How can add Phone Number Charecter Validation asp.net mvc web

Guys I have question How can Add Phone Number Charecter Validation For example.. User writing 8 charecter but ı want minimum 10 charecter and maximum 20 charekter how can add ? Model index.cshtml

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,524 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.
390 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,914 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 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.
142 questions
asked 2023-01-26T09:07:25.9433333+00:00
Harun Ergün 20 Reputation points
answered 2023-01-26T11:19:34.17+00:00
Harun Ergün 20 Reputation points
0 answers

Page refresh?

Hey All:   I am working on an ASP.NET 4.X site (not core) that uses Stripe for payments, and so from the ContactProfile page a user can click Pay, and it takes them to Stripe, and when the payment is processed, redirects back to the Contact Profile page.…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-25T20:45:51.5966667+00:00
John Straumann 21 Reputation points
commented 2023-01-25T21:20:42.23+00:00
AgaveJoe 16,786 Reputation points
3 answers

an email is causing errors

One of our business partners provided an email for her client to send out to prospective employees that missed a space between the URL and the instructions, and now is throwing errors in my MVC application which then sends me notification of the error. …

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-11T21:31:01.5866667+00:00
M J 636 Reputation points
edited an answer 2023-01-25T09:44:22.0266667+00:00
QiYou-MSFT 851 Reputation points Microsoft Employee
0 answers

The result of computation is different in localhost and website

It is written in .NET 4.5.2. The database is Oracle 19c. There is a column that read from database table. On the online site, the value is 0 (incorrect). When I run the Asp.NET Mvc project in my localhost, the value is 20 (the correct one) . How can I…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-17T12:06:26.6233333+00:00
Taha Sözgen 0 Reputation points
commented 2023-01-24T09:46:20.1233333+00:00
QiYou-MSFT 851 Reputation points Microsoft Employee
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 Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,524 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.
390 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,174 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-24T06:12:55.2933333+00:00
Harun Ergün 65 Reputation points
edited a comment 2023-01-24T09:04:00.0066667+00:00
Harun Ergün 65 Reputation points
2 answers One of the answers was accepted by the question author.

How Do I Return ContentDisposition.FileName -PDF from a Method To be Attached to MailMessage

Please I have a method SendRenewalNotification() that calls another Method PolicyScheduleGenerator() to get PDF that it will attach to a MailMessage. The SendRenewalNotification() is pasted below: private void…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 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.
142 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,174 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.
390 questions
asked 2023-01-23T18:37:21.48+00:00
abiodunajai 146 Reputation points
commented 2023-01-23T21:34:41.0433333+00:00
abiodunajai 146 Reputation points
0 answers

How Do I Return ContentDisposition.FileName -PDF from a Method To be Attached to MailMessage

Kindly show me how to achieve this. I have a method SendRenewalNotification() that sends Policy Renewal Notification to Clients. This Method calls another Method called PolicyScheduleGenerator() that Generates PDFs to be attached to MailMessage. …

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.
390 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 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.
142 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,174 questions
asked 2023-01-23T18:03:39.4366667+00:00
abiodunajai 146 Reputation points
edited the question 2023-01-23T18:21:35.97+00:00
abiodunajai 146 Reputation points
1 answer One of the answers was accepted by the question author.

how to use components in razor pages?

I know I can use component like this: <component type="typeof(Editor)" render-mode="ServerPrerendered" /> but can I use it like <Editor /> or <my-editor /> with out import blazor?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,524 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.
390 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-19T02:14:12.6466667+00:00
打玻璃 1,426 Reputation points
accepted 2023-01-23T13:05:13.7633333+00:00
打玻璃 1,426 Reputation points
0 answers

static files in wwwroot is not served in asp.net core mvc 6

I have files in my wwwroot folder like so But still im getting 404 error since the css files are not being served, Even if I try to access it thru localhost: http://localhost:58233/Content/css-new The file is still 404 and not found. I already called…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,524 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
579 questions
asked 2023-01-21T15:34:41.6233333+00:00
cebuhax0r 21 Reputation points
commented 2023-01-23T08:52:08.61+00:00
Zhi Lv - MSFT 18,386 Reputation points Microsoft Employee