Here I will explain how to create custom login page in ASP.NET Core MVC with database. Razor pages is used for display view and ADO.NET for database operations. In this example I have used stored procedure for validation the user.
Пікірлер: 40
@CsharpSpace4 жыл бұрын
For Source Code and Step to Step Tutorials visit: www.voidgeeks.com/tutorial/How-to-Create-Simple-Login-page-in-ASPNET-Core-MVC-with-Database/10
@shaakirahcornelius5653 жыл бұрын
this was so helpful ! Busy with my third year project and this video made it easy to understand
@fitnesssecrets404611 ай бұрын
Really thanks to you sir... Please make more videos on ASP. Net Core MVC or Razor pages
@CsharpSpace11 ай бұрын
Sure will make a video on this topic
@rehankhan-fp1rm4 жыл бұрын
Nice work...keep it up..
@FarazAzhar2 жыл бұрын
Nicely explained. Why was it necessary to use a stored procedure ? Could have queried it directly from the table.
@CsharpSpace2 жыл бұрын
Yes you can use query directly here, I am just use stranded way to code
@softsysdev99854 жыл бұрын
Thaks just i was looking for
@rebecaparedes69034 жыл бұрын
Hi there! I have a problem I wrote all the code but it gives me an error in com.ExecuteNonQuery(); Error: System.Data.SqlClient.SqlException: 'Could not find stored procedure 'Sp_Login'.' This exception was originally thrown at this call stack: [External Code] WebRepublicaDominicana.Models.db.LoginCheck(WebRepublicaDominicana.Models.Ad_login) in db.cs WebRepublicaDominicana.Controllers.HomeController.Index(WebRepublicaDominicana.Models.Ad_login) in HomeController.cs Please help
@CsharpSpace4 жыл бұрын
Create stored procedure sp_login in database, you have not created procedure in database
@AmarjeetKumar-vm9xb4 жыл бұрын
Thank you Sir
@rakeshchandraul7643 жыл бұрын
Thanks sir
@matiasdieguez8634 Жыл бұрын
Hi I am getting the login page but when I try to sign in nothing happens. I am getting no erros either any ideas of where I should check. Cheers.
@CsharpSpace Жыл бұрын
Try to debug application and set break point for actual error
@developersyard28052 жыл бұрын
make a vedio on same this process using Entity Framework
@enriqueestrada42042 жыл бұрын
i have a problem, always TempData say "Admin id or Password is wrong"
@isaacrabin3753 жыл бұрын
Is that OK to use the the "PASSWORD" as password in a login mechanism in the era of .Net Core (+ .Net 5, 6) ? 😕
@aminebessalah9093 жыл бұрын
Bro you can use Microsoft AspNet.Core Identity
@shruti88273 жыл бұрын
Sir itz showing error like dis procedure sp_login expects parameter @Admin_id even after properly passed values also...how i resolve it?
@CsharpSpace3 жыл бұрын
Debug your application and check your value for this parameter, I think this value is null.
@danielmaria79652 жыл бұрын
can you do the same exact code with EFW?
@k-popworldwide32822 жыл бұрын
My view page is showing the form but no validation from the TempData is popping up. Can anyone tell why ?
@CsharpSpace2 жыл бұрын
I think you will not add tempdata on view page.
@jovan98114 жыл бұрын
hi sir, i have this error SqlException: The EXECUTE permission was denied on the object 'Sp_Login', database 'starbucks', schema 'dbo'. pls help
@pjthunder2 жыл бұрын
i had the same issue. need to add EXECUTE SP permission on database
@luisitoelpillopalomon87684 жыл бұрын
How do you connect the SQL server with ASP.NET CORE mvc?
@CsharpSpace4 жыл бұрын
Check my video for Connection string: kzbin.info/www/bejne/moWseZqMirSfl80 Article: voidgeeks.com/tutorial/How-to-read-Connection-string-from-Appsettingjson-in-ASPNET-Core/6
@pradhityabayu59374 жыл бұрын
2.0 and 2.2 version are same? or not much difference?
@CsharpSpace4 жыл бұрын
For difference you can can check this article: docs.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-2.2?view=aspnetcore-3.1
@kumaravelk98294 жыл бұрын
Hi bro, can we do authorization in this login form
@omamam.alnajjar4367 Жыл бұрын
Git heb code?
@MadhuNepal4u4 жыл бұрын
how can we store hassed password rather same password in database?
@CsharpSpace4 жыл бұрын
You can use encryption and decryption for this
@putinninovacuna89764 жыл бұрын
why don't you use entity framework core code first ? can I use EF core ?
@CsharpSpace4 жыл бұрын
Yes you can use it
@madalinsoare87693 жыл бұрын
He already had the database so he could of used EF database first aproach which is older but still very widely used. It is an interesting way to send data like that betwen client and sever. I used the old way so far with ajax calls from javascript, but I am not sure yeh what's the best aproch regarding security issues. I think this is better though but I am not sure. My question is how do you make a page that once you have registered you can't come back to the frost page. That would be intereting to do
@aishwaryarh52744 жыл бұрын
Can we do the same with asp.net web application with .net framework