ASP.NET

Sep 21 2009

Enum DropDownList in ASP.NET MVC

I created an HTML Helper for rendering a dropdownlist aka select element from the name/value pairs in an enum and thought I would share.

Aug 31 2009

Null strings in ASP.NET MVC 1.0 with DataAnnotations

After getting DataAnnotations working with ASP.NET MVC 1.0, I noticed a strange anomaly. Values that were previously bound as empty strings were now being bound as null values.

Aug 31 2009

DataAnnotations in ASP.NET MVC 1.0

DataAnnotations is the Microsoft way of declaratively adding validation rules to a model. You simply add an attribute to a property and voila, it has validation! The concept of DataAnnotations should be familiar to anyone who has worked in Ruby on Rails and added validation rules inside the ActiveRecord model. I'm going to go over some of my findings and walk you through using DataAnnotations. Hopefully my pain, will be your gain.

Jul 27 2009

ASP.NET Password TextBox loses value after Postback

After creating a registration wizard, the password field was not being saved. After tracing the problem, it was found that the TextBox for the password was losing its value when additional postbacks occur prior to processing.

Jul 20 2009

ASP.NET Redirection Module

In rebuilding the Ramsay Corporation website, we changed a large number of URLs for categories and products. To retain backwards compatibilities and provide the proper redirection for users and search spiders, I decided to create an HttpModule to check the Request URL for redirection.

May 19 2009

Embedding an RSS feed with ASP.NET

RSS feeds are a great way to share data. We have a feed of product news that we wanted to embed in pages on our website. There are a variety of ways in which we could do this, but seeing how we like XSL and RSS is XML, it only seemed logical to use XSL to render feed links. This article focuses on loading the RSS feed on the server side and using XSL to transform the feed into HTML.

Apr 17 2009

Building a Windows Web Server using Amazon EC2

In case you're not familiar with Amazon's Elastic Cloud Computing (EC2), it is a server virtualization system that allows building systems in Amazon's massive IT infrastructure. I'm going to go over some of the features and techniques for building a virtual web server using Amazon's EC2 service.

Mar 04 2009

Hierarchical data represented in classes and relational databases

An interesting problem that I've often encountered is how to best represent hierarchical data in a relational database and in classes. I'm going to share a technique for efficiently storing and accessing hierarchical data. In this example I'll be using MySQL and C#.

Feb 22 2009

Recaptcha Error - "Value cannot be null. Parameter name: Challenge

In one web application that uses the popular Recaptcha control to prevent spam we were receiving a decent number of exceptions related to invalid parameters. The error was "Value cannot be null. Parameter name: Challenge". I'm going to explain this error and how to go about fixing it.

Feb 10 2009

Nested Select Elements in ASP.NET MVC using jQuery and AJAX

I was looking for a nice simple implementation of nested select controls in ASP.NET MVC and... low and behold couldn't find anything to my satisfaction. So, I decided to write my own simple method for doing it using jQuery, JSON, and a little MVC magic.

Recent comments