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


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"); …


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…


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 ?


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…


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; } =…


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


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…


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…
"Güncelle" button not working
ı dont undestand. Delete's working but update(Güncelle) not working. Where's my mistake ?


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…


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…


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