calendar_today 10 January 2023 07:35
Blazor's two-way databinding model is extremely powerful, but sometimes
it can get in the way of what you want to do. For example, you might
want to execute an asynchronous operation such as remote validation when a value changes in a
textbox. Perhaps you want to check instantaneously that the value - a username maybe -
doesn't already exist in a database before you accept a new
registration. You cannot add an
onchange event handler if
you already have a value bound to the element, so what can you do? In this
article, I look at solutions for both HTML elements and EditForm input
validation components up to an including .NET 7, and a new
feature released in .NET 7.0.1.
calendar_today 17 November 2022 13:14
In my last article, I looked at building a simple autocomplete component within a Blazor WebAssembly application that fetches data dynamically from a database via an API depending on what the user enters into an input. It works nicely but it has not been designed to be reusable. In this article, I look at the steps required to convert the component so that it can be plugged in anywhere within an application and work with any kind of data.
calendar_today 07 November 2022 13:35
calendar_today 31 October 2022 14:02
So, you allow users to upload images to the server from your Blazor WASM app, but you want to constrain the actual dimensions of the image for some reason. Rather than ask the user to edit the image prior to uploading, you decide to to take care of applying this requirement within the application. And you further decide to do any resizing in the browser prior to uploading so that the resulting upload is smaller and you don't have to waste server resources on the procedure. In this article, I take a look at how to do that, and how to get the dimensions of an image file.
calendar_today 05 November 2019 13:50
The Blazor WebAssembly project template doesn't feature an option to include authentication. If you want to add authentication to a WebAssembly-based Blazor application, you need to do it yourself. This article shows how to add application-wide authentication management and then to use built-in Razor components to protect the FetchData page in the standard template from unauthorised users.
calendar_today 17 October 2019 07:47
A few weeks ago, Steve Sanderson blogged about publishing a package for a prototype Blazor file input component, designed to make working with user-supplied files in Blazor applications a lot easier. Steve has provided some very clear examples demonstrating how to use the component in a number of scenarios. Missing, though, is an example showing how to make an HTTP request to upload a file to some back-end server from a Blazor WebAssembly application.
calendar_today 11 October 2019 12:44
When passing data in a URL within a Blazor application, most of the time you will define route templates that incorporate parameter placeholders, passing values as URL segments. You might also find that you need to be able to work with query string values, so how do you do that in a Blazor application?
calendar_today 05 August 2019 12:40
In my last article, I looked at some of the new things that ASP.NET Core 3.0 will introduce to Razor Pages developers. One of the features that I touched on was Razor Components. In this article, I take a more detailed look at what they are and how they can be used.
calendar_today 24 July 2019 19:44
Later this year, .NET Core 3.0 will be released. The main features include WPF and Windows Forms support (albeit only on the Windows operating system) and server-side Blazor. Razor Pages applications will also see some changes. I cover some of these as part of a guide to upgrading an application from 2.2 to 3.0. Then I have a quick look at some of the other new features. Note that the information in this article is based on Preview 6, and is subject to change.
calendar_today 05 July 2018 13:27
In my last article, I looked at the experimental Blazor framework, using Cascading Dropdown Lists as an entry point. Since then, some feedback from Steve Sanderson to a question I asked has shown me a better way to implement this pattern.
calendar_today 24 May 2018 20:51