Learn the basics of Razor Pages for ASP.NET Core. This course is for anyone who is familiar with ASP.NET Core basics and wants to know how to architect and code real world applications in ASP.NET Core (.NET 6).
✏️ Course developed by Bhrugen Patel. More courses from Bhrugen:
🔗 Longer Razor .NET Core Course:
💻 Code:
⭐️ Course Contents ⭐️
⌨️ (0:00:00) Introduction
⌨️ (0:02:24) Live Preview
⌨️ (0:04:24) Tools Needed
⌨️ (0:05:31) Introduction to .NET Core
⌨️ (0:10:13) Dependency Injection
⌨️ (0:14:48) Create Project
⌨️ (0:17:18) Hot Reload
⌨️ (0:21:42) Razor Pages Introduction
⌨️ (0:22:43) Project File
⌨️ (0:23:55) Launchsettings, wwwroot and appsettings
⌨️ (0:28:29) Programs
⌨️ (0:34:22) Routing Overview
⌨️ (0:39:11) Default Views
⌨️ (0:47:03) Tag Helper
⌨️ (0:49:41) Action Rersult
⌨️ (0:53:19) Create Category Model
⌨️ (0:55:40) Data Annotations
⌨️ (0:58:19) Connection String
⌨️ (1:02:07) ApplicationDbContext
⌨️ (1:06:21) Program.cs Database Settings
⌨️ (1:11:35) Setup Program.cs to use DbContext
⌨️ (1:17:15) Create Database
⌨️ (1:22:57) Categories Get Action Method
⌨️ (1:31:05) Display all categories
⌨️ (1:38:48) Add Create Category Button
⌨️ (1:41:15) Create Category UI
⌨️ (1:44:26) Create Property in Page Model
⌨️ (1:48:29) Create Category and Bind Property
⌨️ (1:55:09) Bootswatch
⌨️ (2:00:41) Server Side Validations
⌨️ (2:06:01) Custom Validations
⌨️ (2:09:38) Display Name and Range Annotation
⌨️ (2:12:58) Client Side Validations
⌨️ (2:17:07) Links for Edit and Delete
⌨️ (2:20:40) Edit Category
⌨️ (2:28:41) Back to List
⌨️ (2:33:05) Delete Category
⌨️ (2:36:43) TempData
⌨️ (2:40:04) Toastr
⌨️ (2:43:13) Partial Views
⌨️ (2:47:29) Scaffold CRUD Pages
⌨️ (2:50:23) Create SQL Database on Azure
⌨️ (2:53:55) Deploy to Azure
⌨️ (2:59:03) Congratulations
🎉 Thanks to our Champion and Sponsor supporters:
👾 Raymond Odero
👾 Agustín Kussrow
👾 aldo ferretti
👾 Otis Morgan
👾 DeezMaster
—
Learn to code for free and get a developer job:
Read hundreds of articles on programming:
34 Comments
Barnabás Gellér
3 years agothanks, it was convenient and easy to follow on right speed.
Murad Shirinov
3 years agoone of the best courses for learnin Asp.Net Core for beginners
R M
3 years agogood job thank you
j
3 years agoi appreciate Indians
CHITUS💙⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
3 years agoFinally. This is exactly what I needed. I have always wondered about this and I've been able to apply it immediately to my project. Thank you so much. Also. Why does everyone pronounce JSON with that weird o sound? Everyone gives it the same o sound as on, pawn, and lawn. I have always said it like the male name Jason and the word son, fun, run. JSON is like the male name Jason because even if you remove the "a" it still sounds like Jason.
show more show lessM Hedayet Hossain
3 years agoA really good tutorial – ASP.NET Core 6, EF Core 6 with Razor Pages – just what I was looking for.
SPARKESTIC
3 years agoThese 3 hours took me 3 days 😂…Really thanks for such a great content
Arvi Vinuya
3 years agoHi! On 2:34:26, can we not just do the following code instead? Seems to be working as well but I am not sure what is the difference:
show more show lesspublic async Task<IActionResult> OnPost()
{
_db.AddressBook.Remove(AddressBook);
_db.SaveChanges();
return RedirectToPage("Index");
}
Thanks in advance.
Аво
3 years ago👍👍👍👍👍👍👍👍👍👍👍
Nick
3 years agoWhat's with the fake comments on the video? So odd
saud imran
3 years agoThanks buddy you explain very clearly God bless you 🙏
Arindam Ghosh
3 years ago47:03
Jenna Ezis King
3 years agoPlease clean up the captions – parts of it is unreadable and as a deaf user, makes it difficult to understand what is being said.
John Benjamin
3 years agoSuper happy to have found this. I've got an internship where they create apps with razor pages and I'm completely lost. Hoping this sets me on the right course once I finish the video
Mohamed Kaddouri
3 years agofell asleep after 10 minutes.
emrullah yıldız
3 years agoEverything is so clear, thanks dude.
Muhammad Khalifa
3 years agoReally good an amazing tutorial so useful, I am a C# Windows Form Programmer and found this tutorial very easy for me to start web development.
Daniel Angel
3 years agoHola, tengo el siguiente problema, el siguiente codigo no esta grabando los registros
using AbbyWeb.Data;
using AbbyWeb.Model;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace AbbyWeb.Pages.Categories;
[BindProperties]
public class CreateModel : PageModel
{
private readonly ApplicationDbContext _db;
public Category Category { get; set; }
show more show lesspublic CreateModel(ApplicationDbContext db)
{
_db=db;
}
public void OnGet()
{
}
public async Task<IActionResult> OnPost()
{
await _db.Category.AddAsync(Category);
await _db.SaveChangesAsync();
return RedirectToPage("Index");
}
}
Mr T
3 years agothis robotic voice i hate it
mursaleenfayyaz
3 years agowe are planning to redesign our application architecture compatible for cloud, so analysis is in progress on ASP.net Core Razor Pages and MVC.
MohammadReza Rahmatzadeh
3 years agothank you, It's really great course.
Joseph Van Caldenborgh
3 years agoI got an error CS1061 I can get not rid of (with the downloaded GitHub source code)
'IServiceCollection' does not contain a definition for 'AddRazorPages' and no accessible extension method 'AddRazorPages' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
AbbyWeb
C:UsersAdministratorDocumentsAbbyAbbyWebProgram.cs
Does anybody know what I have to do?
show more show lessFrankenbeans
3 years agoMy 3rd or 4th course now with Bhrugen and DotNetMastery. Very good content. I thought I'd do a short course before diving into the 23 hour course on MVC.
ItsMePhoebe
3 years agoThank you for this video!! It was a godsend for me! I was wondering if anyone could explain the difference between update database and add migration? I've tried Google but still dont really understand the difference…. :S
Attila Guba
3 years agoGreat tutorial! I've done his MVC as well! Clear explanation and understandable ! Hope he will make Identity / Role based , Google, Facebook authentication and etc /tutorial as well with hosting!
Daniel Vega Villamonte - Informática
3 years agoMay the Lord bless you and the Virgin Mary intercede for you.
iman gholi
3 years agoI appreciate your content but the Blazor gave you few thing and took a huge thing called JAVASCRIPT! from you, and if it gave you some optuins to resurrect javascript but it easier to proceed doing it non blazor and then thanking God afterwards. Why?
SK
3 years agoBy far the best Razor introduction course I've seen on Youtube.
Everything is so concise and well explained. Thank you, Bhrugen.
Ontario County
3 years agoHello Bhrugen,
Excellent tutorial. I am new to both C# and Visual Studio 2022 and this amazing tutorial was very easy to follow. Only teeny tiny quibble was trying to follow which CTRL+. that you selected at times because it was done so quickly. There were several times I had to back up a few times and pause to finally catch it!
I do have a question that I think would help many other users as well. How would I create a drop-down choice box on a form that would link to ANOTHER table? I would like to populate the drop-down with table data, not with a static list.
For example, let's say I have a table called "Colors". I want to have a form so that the user can add more colors to this table (it will look just like the sample form you created in this tutorial. That isn't a problem, thanks to you! 🙂
Then, I would like to use this "user updated table" to provide the contents for the dropdown in another form. For example, let's say I have a form for someone to order a t-shirt. I want a drop-down box on the form for someone to pick their desired t-shirt color. The drop-down would go look at my "Colors" table and display the list of available color choices.
Meanwhile, that "Colors" table would be kept up to date by a company user (so that IT does not have to go in and change the code to add or remove a color) thereby the drop-down would always have the current colors available.
One other small question to go along with that. How do I get the choices in the drop-down box to display alphabetically? And, how do I get the fields on the forms in your tutorials to display alphabetically?
Thanks so much for any and all assistance you can provide!
Melissa
show more show lessTihomir Jovanovic
3 years agoCopy, paste then modify code is not a good programming practice…
Bart Heimenberg
3 years agoGreat introduction to Razor pages. Thanks a lot. Enjoyed every single subject. Will check out your advanced course now.
Attila Guba
3 years agoI've made it with SweetAlert Javascript library and some extra as well:
https://youtu.be/3MTOxn9vRJ4
Razak Alsharafy
2 years agobest Razor introduction course I've seen on YouTube.
Sally Parkes
2 years agoHELP!!!! I have followed this avidly and set up a project to the point of add-migration AddAmendmentToDb (Mine is Amendment rather than Category). Despite having the correct tool package installed and matching versions with all other installed packages, clearing cache, closing Visual Studio (2022) down etc, I keep on getting that error. Any ideas anyone?
show more show less