Skip to main content

Tagged: c-sharp

  • ASP.NET/C# image resizer for responsive layouts


    I will probably elaborate on this a bit further when I find some more time, but for now, this post is going to be mostly code. What I have here is a relatively simple way to generate images that are resized server-side based on the screen …

  • Dynamic GridView rows in ASP.NET


    Here's a simple proof-of-concept for dynamically adding and removing rows in an ASP.NET GridView control while maintaining the existing data.

  • Validating file uploads in Sitecore WFFM


    Our Sitecore installation was in dire need of a way to lock down file uploads on forms built with the Web Forms for Marketers (WFFM) module; out of the box, it doesn't do any checking at all, which can lead to some risky situations. I …

  • LDAP authentication with C#


    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 …

  • rexCrawler and HelpfulHighlighter are now open source


    After having dipped my toe in the water of open source with some Arachni module changes and the development of a simple WordPress plugin, I've finally taken the plunge; two of my personal projects are now completely open source, and …

  • Programmatically compile Audiences in SharePoint 2010


    According to the documentation for the SharePoint 2010 SDK, you cannot trigger Audience compilation programmatically. Well—that's not true. It isn't documented, but it is possible. The painful thing about it is that you must know the …

  • bulkRename v2.0 released


    I've converted my bulk file renaming utility from VB.NET to C# and made use of a command line arguments parsing library so that it will accept folders and regex patterns with spaces in them. It behaves a bit weird if you don't encapsulate …

  • Simple file access concurrency in C#


    When working without the safety net of a RDBMS in a multi-user environment, file concurrency may become an issue. In a project I've been working on recently, XML files are being used as the custom data store. This is all fine and dandy …

  • Check all CheckBoxes in a GridView using jQuery


    If you're working with a GridView control where you've built a CheckBox control into each row of data displayed, odds are, it would be convenient for your users if a "Check/Un-check All" option was available. The following …

  • 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 …

  • Programmatically modifying file permissions in .NET


    For one reason or another, somewhere down the line, you're probably going to want to modify a file's access permissions from your code. Maybe your users have a nasty habit of overwriting them, or you want to ensure that newly-created …

  • Image dimension Field Validator for Sitecore CMS


    This StandardValidator extension will determine whether or not a given ImageField's source image's height and width match with given parameters. Either parameter can be omitted if, for instance, you only care about validating the width of …

  • Currency Field Validator for Sitecore CMS


    This StandardValidator extension will determine whether or not a given field value passes for currency. In order to do so, it must meet the following requirements: It must pass decimal.TryParse() It must not have more than 2 digits past …

View all tags