Category Archives: Best Practice

Google Search Results Changes

Google have announced changes to the way they will display search results for some websites. For those of us who curate our sites, there are a few things that we should consider.

Object Mappers – Merge Objects Together

The idea of mapping objects together is quite simple. It’s like a “merge” the data from 2 objects into one single object. AutoMapper is one tool that helps you achieve this and I will explain some use cases for it.

Easy Do-It-Yourself Captcha

Everyone has seen a Captcha. It is one of those crazy, weird boxes that asks you to type the almost impossible to read words shown on the screen. Here is an idea on how to avoid having one, and still blocking most bots from your site.

C# Transactions

As good developers, we all try to handle exceptions as holistically as possible. I get quite annoyed when I am on a site and some action results in the ugly red ASP.Net error screen. This article talks about handling multiple errors and how to roll them back within a transaction.

T-SQL Tools

For those of us who are “full stack” developers, we often have to deal with other people’s code. This can mean that we get code that is poorly formatted or has lost formatting due to an export or some other reason. Here are some tools that may help you out.

Database Connection in Codebehind

I’ve been asked a few times to explain how to connect to a database using code, instead of just using SQLDataSource in Design view. This article explains how to connect to a database and by passing parameters to a Stored Procedure which returns a result set.

Gridview Selection with Checkboxes

We all use Gridview controls to show tabular data. That’s what they are designed to do. But what if you want to just display a table of data and allow the user to select one (or many) rows so that the system can associate those rows with something else.

Client-side Form Validation

Every form needs to be validated in one way or another. The most basic form of validation is check that all required fields have been given values. Here is a script that should help with that.