Tags: aspx

Custom error messages with ValidationSummary in ASP.NET

Sometimes, there are problems encountered in a code-behind file that don’t warrant the extra work and mark-up that would otherwise be required to add CustomValidator controls to the page for displaying error messages to the user through your ValidationSummary. Wouldn’t it be nice if you could (somewhat) easily take care of it in your code-behind file alone, without adding additional clutter to your UserControl/Page/etc.? Well, you can! The following IValidator extension class can be added to a Page‘s Validators list with ease for displaying custom error messages. Read More →

LDAP authentication with VB.NET

LDAP, or Lightweight Directory Access Protocol, is a convenient, central repository for a system’s personnel information. LDAP (and other Active Directory services) are widely-used by organizations big and small to consolidate user credentials and identification data. For instance: a reporting services application, a webmail client, and a database administration suite can all read from the same Directory, with no need for replicating user information. John Doe only has to remember one password for all systems. When he changes it, those changes cascade across the board. Read More →

Using the ConnectionStrings element in ASP.NET web.config

If you are building a series of web applications that may rely on duplicate data (such as connection strings for pages that query databases), or you want to separate certain constants from your other code, you need a centralized method for storing and referencing that data. In this case, the ConnectionStrings element in the web.config file of either your application’s root directory, parent directory, or the web server root directory–depending on your application’s inheritance–can prove incredibly useful. Read More →