Blog posts

178 results found

178 results in .NET, Umbraco

umbraco umbracoUrlAlias - Create an alternative URL for a page in Umbraco

Using the umbracoUrlAlias property on a page in Umbraco gives you the ability to set up one or more different URLs for a single page. The page structure of your site might create long URLs, and you may want to a shorter one, the umbracoUrlAlias will do that for you. Or a page may have previously existed with a different URL, and you want to catch the traffic going to that URL and get them to look at this page, the umbracoUrlAlias will do that for you as well.

umbraco How to install Umbraco using Visual Studio NuGet IIS and SQL Server

This post gives you a step by step guide on how to install Umbraco on your local machine using Visual Studio, NuGet, IIS and SQL Server.

umbraco Intercepting content and member save events in Umbraco

In Umbraco, you may want to perform certain actions when a content item or member is being saved or created. This post shows you how to do that. This is relevant for Umbraco projects that use MVC.

dotnet How to use bundling to minify css and JavaScript in MVC and Umbraco

This post shows you how to set up and use bundling and minification in your MVC website. There are specific instructions on how set it up for Umbraco websites too.

dotnet How do you use the try catch finally blocks?

I must admit, in the past when I just want some code to run, but it's not critical if it fails, I have written a try catch block which looks like this.

dotnet Please tell me you don't write if true equals true

It drives me crazy when I see code where someone is checking a boolean to see if it is true or not and they write it like this.

dotnet MVC Custom Model Property Validation Attributes

This post shows you how to create your own custom validation attributes in MVC. You can then decorate your model properties with them on your forms.

umbraco Simple Umbraco search example

This post shows you how easy it is to use the default Umbraco search functionality in your site. It uses a basic form and then uses razor to display your search results.

umbraco How to create url rewrite rules in Umbraco

This post teaches you how to set rewrite rules for your umbraco site. You may want to force your site to go to a secure url or force it to go to a url with www. at the start. To add these rules, you need to go to the file /config/UrlRewriting.config

umbraco Creating members in Umbraco programmatically

This post gives you the code for creating members programmatically in Umbraco. When you use this code, you can pass in the member's username, name, email address and optionally you can pass in their password and optionally assign them to a role/group.

dotnet SHA 256 and SHA 512 hash examples

This post contains examples of how to generate a SHA 256 and SHA 512 hash key with the examples in C# and VB.NET This solution matches the expected result for Ingenico's implementation for their payment gateway.

tools·dotnet LINQPad

I recently came across this fantastic resource. It is called LINQPad. You can use it to test any C#, F# or VB snippet or program. You can even use it to query databases in LINQ or SQL. It's ideal if you find some code on the internet that you want to quickly test, or if you want to play with the new features in C# 6 without having to set up a windows console/forms app or website.