<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title type="text">Mikesdotnetting News Feed</title>
    <subtitle type="text">Latest additions to Mikesdotnetting</subtitle>
    <id>urn:uuid:5f7fe613-2d22-47b0-9d9b-688e73e93a94;id=1</id>
    <rights type="text">(c)2026, Mike Brind. All rights reserved</rights>
    <updated>2023-10-10T06:03:52Z</updated>
    <link rel="alternate" href="https://www.mikesdotnetting.com/feed" />
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/367/working-with-sass-in-an-asp-net-core-application</id>
        <title type="text">Working with Sass in an ASP.NET Core application</title>
        <summary type="html">Sass (Syntactically Awesome Style Sheets) is a is a scripting language that is used to generate cascading style sheets (CSS files). Its syntax is very &#xD;&#xA;            similar to CSS itself, but it supports the use of variables, nesting, mixins and selector inheritance, none of which are available in CSS itself.  &#xD;&#xA;&#x9;&#x9;However, these features help you to organise and maintain your web &#xD;&#xA;&#x9;&#x9;application&#x27;s styles. In this article, I look at the steps required to incorporate and configure Sass in your ASP.NET Core project in both Visual Studio, and VS Code.</summary>
        <updated>2023-06-02T06:50:59&#x2B;01:00</updated>
        <link href="https://www.mikesdotnetting.com/article/367/working-with-sass-in-an-asp-net-core-application" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/366/why-doesnt-my-asp-net-core-7-web-app-launch-on-https</id>
        <title type="text">Why doesn&#x27;t my ASP.NET Core 7 web app launch on HTTPS?</title>
        <summary type="html">Up until .NET 7, when you use the &lt;code&gt;dotnet run&lt;/code&gt; command to run  your ASP.NET Core Razor Pages (or MVC) app, the built-in Ketstrel web server would listen on two URLs, one with a &#xD;&#xA;&#x9;&#x9;&lt;code&gt;http&lt;/code&gt; protocol and another that uses the &lt;code&gt;https&lt;/code&gt; protocol. This behaviour is documented in many places (&lt;a href=&quot;https://www.manning.com/books/asp-net-core-razor-pages-in-action?utm_source=mikebrind&amp;amp;utm_medium=affiliate&amp;amp;utm_campaign=book_brind_razor_7_26_21&amp;amp;a_aid=mikebrind&amp;amp;a_bid=f71bcc8c&quot;&gt;including my book&lt;/a&gt;) so it might come as a surprise when &#xD;&#xA;&#x9;&#x9;you run your new .NET 7 app from the command line and it is only available on an &#xD;&#xA;&#x9;&#x9;&lt;code&gt;http&lt;/code&gt; binding. Something changed in .NET 7. What is it and how do you test your .NET 7 web app under &#xD;&#xA;&#x9;&#x9;&lt;code&gt;https&lt;/code&gt;?&#xD;&#xA;</summary>
        <updated>2023-03-20T01:37:26&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/366/why-doesnt-my-asp-net-core-7-web-app-launch-on-https" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/365/executing-async-operations-onchange-in-blazor</id>
        <title type="text">Executing async operations onchange in Blazor</title>
        <summary type="html">Blazor&#x27;s &lt;a href=&quot;https://www.learnblazor.com/data-binding&quot;&gt;two-way databinding model&lt;/a&gt; is extremely powerful, but sometimes &#xD;&#xA;&#x9;&#x9;it can get in the way of what you want to do. For example, you might &#xD;&#xA;&#x9;&#x9;want to execute an asynchronous operation such as remote validation when a value changes in a &#xD;&#xA;&#x9;&#x9;textbox. Perhaps you want to check instantaneously that the value - a username maybe - &#xD;&#xA;&#x9;&#x9;doesn&#x27;t already exist in a database before you accept a new &#xD;&#xA;&#x9;&#x9;registration. You cannot add an &lt;code&gt;onchange&lt;/code&gt; event handler if &#xD;&#xA;&#x9;&#x9;you already have a value bound to the element, so what can you do? In this &#xD;&#xA;&#x9;&#x9;article, I look at solutions for both HTML elements and EditForm input &#xD;&#xA;&#x9;&#x9;validation components up to an including .NET 7, and a new &#xD;&#xA;&#x9;&#x9;feature released in .NET 7.0.1.</summary>
        <updated>2023-02-15T09:32:57&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/365/executing-async-operations-onchange-in-blazor" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/364/exploring-generating-pdf-files-from-html-in-asp-net-core</id>
        <title type="text">Exploring generating PDF files from HTML in ASP.NET Core</title>
        <summary type="html">Back in 2008, I wrote a &#xD;&#xA;&lt;a href=&quot;https://www.mikesdotnetting.com/category/20/itextsharp&quot;&gt;series of articles &#xD;&#xA;about using iTextSharp to generate PDF files in an ASP.NET application&lt;/a&gt;. I &#xD;&#xA;still use iTextSharp in a large MVC 5 application that I&#x27;m in the process of&#xD;&#xA;&lt;a href=&quot;https://www.mikesdotnetting.com/article/360/incrementally-migrating-an-asp-net-framework-application-to-razor-pages&quot;&gt;&#xD;&#xA;migrating to ASP.NET Core&lt;/a&gt;. The version I use is very old (4.1.6), and the &#xD;&#xA;API is very low level so it takes quite a while to write the code required to generate &#xD;&#xA;even a moderately complex PDF. Ideally I need a replacement for the new &#xD;&#xA;application that can generate PDF files purely from HTML, which is an API I&#x27;m &#xD;&#xA;much more comfortable with. This ancient version of iTextSharp doesn&#x27;t support &#xD;&#xA;HTML as a source of content. In this article, I consider some alternatives.</summary>
        <updated>2022-11-30T01:45:51&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/364/exploring-generating-pdf-files-from-html-in-asp-net-core" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/363/a-reusable-generic-autocomplete-component-for-blazor</id>
        <title type="text">A reusable generic autocomplete component for Blazor</title>
        <summary type="html">In&#xD;&#xA;&lt;a href=&quot;https://www.mikesdotnetting.com/article/362/simple-autocomplete-for-blazor&quot;&gt;&#xD;&#xA;my last article&lt;/a&gt;, I looked at building a simple autocomplete component within &#xD;&#xA;a Blazor WebAssembly application that fetches data dynamically from a database &#xD;&#xA;via an API depending on what the user enters into an input. It works nicely but &#xD;&#xA;it has not been designed to be reusable. In this article, I look at the steps required to convert the &#xD;&#xA;component so that it can be plugged in anywhere within an application and work &#xD;&#xA;with any kind of data.</summary>
        <updated>2022-11-17T01:14:18&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/363/a-reusable-generic-autocomplete-component-for-blazor" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/362/simple-autocomplete-for-blazor</id>
        <title type="text">Simple Autocomplete for Blazor</title>
        <summary type="html">One of the things I really like about Blazor is how often it is easy to implement &#xD;&#xA;features in your application that, if needed in a server-side application, would have you testing your JavaScript-fu or &#xD;&#xA;reaching for a third party component. One example is an autocomplete component &#xD;&#xA;that fetches live data from a database that matches that which a user enters &#xD;&#xA;into a form control and changes as the user types. In this &#xD;&#xA;article, I&#x27;ll show how to build such a component for a Blazor WebAssembly app &#xD;&#xA;and style it like a dropdown.</summary>
        <updated>2022-11-08T08:49:37&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/362/simple-autocomplete-for-blazor" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/361/resize-images-before-uploading-in-blazor-web-assembly</id>
        <title type="text">Resize images before uploading in Blazor Web Assembly</title>
        <summary type="html">So, you allow users to upload images to the server from your Blazor WASM app, but you &#xD;&#xA;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 &#xD;&#xA;&lt;em&gt;prior&lt;/em&gt; to uploading so that the resulting upload is smaller and you don&#x27;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.</summary>
        <updated>2022-10-31T02:03:44&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/361/resize-images-before-uploading-in-blazor-web-assembly" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/360/incrementally-migrating-an-asp-net-framework-application-to-razor-pages</id>
        <title type="text">Incrementally Migrating an ASP.NET Framework application to Razor Pages</title>
        <summary type="html">Do you have a huge .NET framework application (Web forms, MVC) that &#xD;&#xA;&#x9;&#x9;relies on authentication and/or System.Web types that you would &#xD;&#xA;ideally like to migrate to .NET Core, but just don&#x27;t have the bandwidth to put &#xD;&#xA;everything on hold while you rewrite the entire application on a new framework? &#xD;&#xA;If so, you might be interested in an exciting new project from Microsoft - &#xD;&#xA;&#x9;&#x9;&lt;a href=&quot;https://github.com/dotnet/systemweb-adapters&quot;&gt;SystemWebAdapters for ASP.NET Core&lt;/a&gt;&#xD;&#xA;- that enables you to incrementally migrate your old application, endpoint by &#xD;&#xA;endpoint.</summary>
        <updated>2022-10-11T01:41:10&#x2B;01:00</updated>
        <link href="https://www.mikesdotnetting.com/article/360/incrementally-migrating-an-asp-net-framework-application-to-razor-pages" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/359/strongly-typed-middleware-in-asp-net-core</id>
        <title type="text">Strongly Typed Middleware in ASP.NET Core</title>
        <summary type="html">Most ASP.NET Core developers are familiar with the traditional way to author &#xD;&#xA;middleware classes which is based on conventions. The vast majority of examples &#xD;&#xA;out there feature the convention-based approach. But &#xD;&#xA;there is also a strongly typed approach available which is based on implementing &#xD;&#xA;the &lt;code&gt;IMiddleware&lt;/code&gt; interface. This seems to be one of ASP.NET Core&#x27;s &#xD;&#xA;best kept secrets, so I thought I&#x27;d pull the curtains back and let some light &#xD;&#xA;shine on it.</summary>
        <updated>2022-08-24T12:30:51&#x2B;01:00</updated>
        <link href="https://www.mikesdotnetting.com/article/359/strongly-typed-middleware-in-asp-net-core" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/358/using-minimal-apis-in-asp-net-core-razor-pages</id>
        <title type="text">Using Minimal APIs in ASP.NET Core Razor Pages</title>
        <summary type="html">If you are using ASP.NET Core Razor Pages to develop your web&#xD;&#xA;        application, you have already decided that the majority of your HTML&#xD;&#xA;        will be generated on the server. Nevertheless, chances are that you will&#xD;&#xA;        want to introduce some client side operations into the application to&#xD;&#xA;        improve its user friendliness in places. If those operations involve&#xD;&#xA;        data, you will probably want to work with JSON. From .NET 6, you can use&#xD;&#xA;        a simplified minimal request handler API that works with JSON by&#xD;&#xA;        default.</summary>
        <updated>2021-12-14T01:33:30&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/358/using-minimal-apis-in-asp-net-core-razor-pages" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/357/razor-pages-startup-in-net-6</id>
        <title type="text">Razor Pages Startup in .NET 6</title>
        <summary type="html">When you create a new web app using .NET 6 (from the new RC1 templates), you might notice something is missing. There is no Startup class. What happened to it? And how do you configure your new .NET 6 &#xD;&#xA;web app?</summary>
        <updated>2021-10-08T08:34:09&#x2B;01:00</updated>
        <link href="https://www.mikesdotnetting.com/article/357/razor-pages-startup-in-net-6" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/356/i-am-writing-a-book-about-razor-pages</id>
        <title type="text">I am writing a book about Razor Pages</title>
        <summary type="html">Just over three years go, when Razor Pages was first launched, I had a number of questions from people asking whether I was going to write a book about the Razor Pages framework. I guess they asked me  because Razor Pages appeared to be a natural successor to the old ASP.NET Web Pages framework, and I had written a book about that. Also, I was regularly blogging at the time about all the good things you could do with Razor Pages. &lt;a href=&quot;https://www.mikesdotnetting.com/article/314/im-not-writing-a-book-on-razor-pages&quot;&gt;The answer then was No&lt;/a&gt;, primarily because I was working on my own tutorial/documentation site &#xD;&#xA;for Razor Pages - &lt;a href=&quot;https://www.learnrazorpages.com/&quot;&gt;learnrazorpages.com&lt;/a&gt;.</summary>
        <updated>2021-11-24T03:35:38&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/356/i-am-writing-a-book-about-razor-pages" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/355/css-isolation-in-razor-pages</id>
        <title type="text">CSS Isolation In Razor Pages</title>
        <summary type="html">CSS isolation was introduced in .NET 5 for Blazor components. Now it&#x27;s coming to Razor Pages (and MVC views) in .NET 6, due to be released in November this year. Here&#x27;s a quick look at &#xD;&#xA;how CSS isolation works in Razor Pages and the kind of problem that it&#x27;s designed to solve.</summary>
        <updated>2023-03-23T09:03:57&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/355/css-isolation-in-razor-pages" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/354/implementing-a-custom-typeconverter-in-razor-pages</id>
        <title type="text">Implementing a Custom TypeConverter In Razor Pages</title>
        <summary type="html"> In my most recent article, I showed &#xD;&#xA;&#x9;&#x9;&lt;a href=&quot;https://www.mikesdotnetting.com/article/353/implementing-a-custom-model-binder-in-razor-pages&quot;&gt;how to create a custom model &#xD;&#xA;&#x9;&#x9;binder&lt;/a&gt; to bind an ISO 8601 string representation of a week of the year &#xD;&#xA;&#x9;&#x9;to a &lt;code&gt;DateTime&lt;/code&gt; type in a Razor Pages application. The custom &#xD;&#xA;&#x9;&#x9;model binder leant heavily on the existing infrastructure that binds &#xD;&#xA;&#x9;&#x9;strings to simple types. Custom model binders are the correct solution &#xD;&#xA;&#x9;&#x9;if you want to bind to simple types, but if you want to bind to a &#xD;&#xA;&#x9;&#x9;complex type, the recommendation is to implement a &lt;code&gt;TypeConverter&lt;/code&gt;&#xD;&#xA;&#x9;&#x9;&lt;a href=&quot;https://docs.microsoft.com/en-us/aspnet/core/mvc/advanced/custom-model-binding?view=aspnetcore-3.1#recommendations-and-best-practices&quot;&gt;&#xD;&#xA;&#x9;&#x9;according to the offical docs&lt;/a&gt;. But the docs don&#x27;t provide an example &#xD;&#xA;&#x9;&#x9;that shows how to do that in the context of model binding. So here&#x27;s &#xD;&#xA;&#x9;&#x9;one.</summary>
        <updated>2020-11-24T06:34:21&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/354/implementing-a-custom-typeconverter-in-razor-pages" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/353/implementing-a-custom-model-binder-in-razor-pages</id>
        <title type="text">Implementing a Custom Model Binder In Razor Pages</title>
        <summary type="html">In Razor Pages, model binding is the process that maps data from an HTTP request to &#xD;&#xA;&#x9;simple PageModel properties or handler parameters. &#xD;&#xA;&#x9;Incoming data can be included in a request as posted form values, query &#xD;&#xA;&#x9;string values or route data. The default collection of model binders cover &#xD;&#xA;&#x9;every simple .NET data type.. But sometimes they are not enough, and you need to add &#xD;&#xA;&#x9;your own implementation.</summary>
        <updated>2020-11-10T03:28:04&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/353/implementing-a-custom-model-binder-in-razor-pages" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/352/working-with-dates-and-times-in-razor-pages-forms</id>
        <title type="text">Working with Dates And Times in Razor Pages Forms</title>
        <summary type="html">When working with dates and times in a Razor Pages form, you need to render &#xD;&#xA;&#x9;a suitable control based in the task requirement. Prior to HTML5, developers &#xD;&#xA;&#x9;largely depended on third party date picker libraries. Now, a variety of native &#xD;&#xA;&#x9;browser options &#xD;&#xA;&#x9;exist, although they enjoy &lt;a href=&quot;https://caniuse.com/?search=date%20and%20time&quot;&gt;&#xD;&#xA;&#x9;varied support across modern browsers&lt;/a&gt;. These include options for &#xD;&#xA;&#x9;managing the date and time, just the date or time, and for working with the &#xD;&#xA;&#x9;month or week of the year. </summary>
        <updated>2021-06-29T06:23:08&#x2B;01:00</updated>
        <link href="https://www.mikesdotnetting.com/article/352/working-with-dates-and-times-in-razor-pages-forms" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/351/display-images-in-bootstrap-carousel-using-razor-pages-and-entity-framework</id>
        <title type="text">Display Images in Bootstrap Carousel using Razor Pages and Entity Framework</title>
        <summary type="html">This short article shows how to display images stored in a database in a Razor Pages application using the Bootstrap Carousel and Entity Framework Core.</summary>
        <updated>2020-06-19T03:37:02&#x2B;01:00</updated>
        <link href="https://www.mikesdotnetting.com/article/351/display-images-in-bootstrap-carousel-using-razor-pages-and-entity-framework" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/350/razor-pages-and-bootstrap-lazy-loading-tabs</id>
        <title type="text">Razor Pages And Bootstrap - Lazy Loading Tabs</title>
        <summary type="html">Tabbed interfaces are a great way for managing the presentation of large amounts of information into separate panels, where each panel&#x27;s data makes sense on its own, and only one panel is viewable at a time.  The tabs in a browser are a great example of this. From a Razor Pages developer&#x27;s point of view, tabs are particularly useful for controlling the display of complex data in Line Of Business applications.</summary>
        <updated>2020-06-10T12:34:23&#x2B;01:00</updated>
        <link href="https://www.mikesdotnetting.com/article/350/razor-pages-and-bootstrap-lazy-loading-tabs" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/349/razor-pages-and-bootstrap-modal-master-details</id>
        <title type="text">Razor Pages And Bootstrap - Modal Master Details</title>
        <summary type="html">This is the first in a series of posts exploring how to use some of the &#xD;&#xA;components provided by Bootstrap within a database-driven Razor Pages web &#xD;&#xA;application. In this article, I look at using the Bootstrap Modal in a &#xD;&#xA;Master/Details scenario, to display the details of the selected record in a &#xD;&#xA;master list.</summary>
        <updated>2023-10-10T07:03:52&#x2B;01:00</updated>
        <link href="https://www.mikesdotnetting.com/article/349/razor-pages-and-bootstrap-modal-master-details" />
    </entry>
    <entry>
        <author><name>Mike Brind</name></author>
        <id>https://www.mikesdotnetting.com/article/348/razor-pages-localisation-seo-friendly-urls</id>
        <title type="text">Razor Pages Localisation - SEO-friendly URLs</title>
        <summary type="html">This is the fourth article in a series that explores various aspects of localisation in ASP.NET Core Razor Pages applications. This article concentrates on the SEO aspects of localisation as they pertain to URL management, and how to utilise the RouteDataRequestCultureProvider to help you manage that. </summary>
        <updated>2020-01-07T07:39:46&#x2B;00:00</updated>
        <link href="https://www.mikesdotnetting.com/article/348/razor-pages-localisation-seo-friendly-urls" />
    </entry>
</feed>