Hey Reader, This week, I'm diving into a couple of topics that have been popping up frequently in your questions. I hope you'll find the insights below helpful! 🛠️Cascading DropdownsDid you know there's no built-in component in Blazor for dropdowns that update based on another dropdown's selection? No worries - I’ve got you covered! Check out the video below where I show you how to build your own. ​The key is to use the standard HTML select element instead of Blazor’s InputSelect. Then, harness the power of the relatively new @bind:after directive to trigger a specific method whenever a dropdown’s value changes. This technique is super versatile and can be applied to more than just dropdowns. 🔍 SEO with BlazorThere's a common misconception that Blazor doesn't play well with SEO, similar to other SPA frameworks. But with the release of .NET 8, that's simply not the case anymore! By default, Blazor now uses SSR (static server-side rendering), which means all content is rendered on the server before reaching the client. This allows search engines and crawlers to see the actual content of a page. Plus, pre-rendering is enabled for other rendering modes by default. Curious about how each rendering mode works with SEO? I've got a detailed video breakdown just for you below. ​If you have more questions or need further clarification, just hit reply to this email. I’m here to help with more tutorials and to answer all your queries. A massive thank you to our community and my Patrons for your support. You are the backbone of this newsletter and my YouTube channel. Stay safe! Take care & happy coding, Patrick |
Become a .NET & Blazor expert with weekly tutorials featuring best practices and the latest improvements, right in your inbox.
Hey Reader, Ever tried to choose the perfect weapon for each creature in a dark, spooky forest? Silver bullets for werewolves, garlic for vampires, chainsaws for zombies... but what if you had to pick your weapon before entering the forest? Just like that forest adventure, dependency injection in C# can leave you stuck with the wrong tool when you need it most - unless you know about the Factory Pattern! Today, I’m breaking down how the Factory Pattern solves real-world dependency injection...
Hey Reader, In today’s tutorial, I’ll walk you through how to use Dapper, a high-performance micro ORM (object-relational mapper) with a .NET 8 Web API and SQL Server. We’ll cover everything you need to know to build a simple CRUD (Create, Read, Update, Delete) application. Watch on YouTube 📺 Check out the full tutorial on YouTube to see everything in action 👇 What We’ll Be Doing We’re going to work with a simple video game database to start. You’ll learn how to: Read all games or a specific...
Hey Reader, Today, I show you how combining Blazor and JavaScript can give you the best of both worlds. Let’s dive into how you can easily mix the power of these two technologies in your projects! Watch on YouTube 📺 Check out the full tutorial on YouTube to see everything in action 👇 A Simple Example: Console Logging in Blazor Imagine you’re working on a Blazor Server application, and you want to log the current count (of the Counter page) to the console. Your first thought might be to use...