Content
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…


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…


Request.IsAuthenticated is false when using Azure AD
Hello, In asp.net 4.8 (not Core) web application, I have set Client Id, RedirectUri, Tenant and Authority in Web.Config. In Startup.cs, I have following: string clientId =…


the taghelper do not rendered?
using Microsoft.AspNetCore.Razor.TagHelpers; namespace tag.Components { [HtmlTargetElement("pagination", TagStructure = TagStructure.WithoutEndTag)] public class PaginationTagHelper : TagHelper { …
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> …
Model is always null on Razor page
hello All, I have the following code on my cshtml page: @if (Model!=null && Model.EmergencyInfos!=null && Model.EmergencyInfos.ToList().Count>0) { var count = Model.EmergencyInfos.Count; @for…


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…


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…


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…


What is the difference of = and {get;set;}?
public int PageIndex{get;set;}=0; public int PageIndex=0; what is the difference?
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…
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…


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…
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.
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 ...


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…
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


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.…


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. …


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…

