Blog posts

66 results found

66 results in .NET, Git, Web

dotnet How to fix the error 'The following sections have been defined but have not been rendered for the layout page...'

This post shows you how to solve the error 'The following sections have been defined but have not been rendered for the layout page "~/Views/Master.cshtml": "Head; ScriptsBottom; etc; etc".'

dotnet How to add reCAPTCHA to an MVC form

This blog post makes it easy for you to set up Google reCAPTCHA on your MVC website. It also works with Umbraco.

dotnet Open-source Project: Password Generator

I recently caught the bug of contributing to open-source projects after my first pull request was accepted. I enjoyed it so much that I decided to make an open-source library for my password generator. It is a C# .NET project.

dotnet How to change a form in MVC to submit with AJAX

In this video you will see how to change the form to submit using AJAX. I recorded this video live for my livecoding channel. The code I wrote for this tutorial is further down this post.

dotnet How to create and use custom configuration sections in ASP.NET

This post will show you how to create a custom config section in your .NET application and use it in your code.

dotnet How to scrape meta data from a url using HtmlAgilityPack in C#

This post gives you the code create a meta data scraper so you can get information from a url, using HtmlAgilityPack in C#.

dotnet Simple .NET keep alive handler to prevent timeout

This post shows you how to create a simple keep alive for a .NET website so people can stay logged in whilst the page is open, instead of it timing out after 20 minutes.

dotnet Simple Reusable .NET Caching Example Code in C#

Caching is important because it can speed up your website or application. Here is a simple example for you to take away and re-use:

dotnet How to fix Font Awesome WebFont woff2 not found

If you are getting the error fontawesome-webfont.woff2?v=4.6.3 not found but you definitely know you have the file, here is how to fix it in IIS.

dotnet Switch between ajax and post back in the same form

I realised that I needed to change the mode of the form depending on which button was pressed. So I came up with this bit of javascript/jquery.

dotnet How to create a random password generator in C#

In this post I will show you how to create your own password generator in C#. It can be used to generate random strong passwords and it complies with recommendations from OWASP

dotnet LINQ method to see if two lists contain a match

This post gives you the code to check if two lists contain a match. It is written in C# and uses LINQ.