About Mads Kristensen

Mads Kristensen currently works as a Senior Developer at Traceworks located in Copenhagen, Denmark. Mads graduated from Copenhagen Technical Academy with a multimedia degree in 2003, but has been a professional developer since 2000. His main focus is on ASP.NET but is responsible for Winforms, Windows- and web services in his daily work as well. A true .NET developer with great passion for the simple solution.

Using the API for the W3C HTML Validator
· 6

The W3C has introduced an API for their HTML Validator.

Protecting Your Site from Brute Force

On a website with the ability for users to logon, it is a good idea to have some sort of password policy.

ASP.NET: Is it too Difficult?
· 1

There is no doubt in my mind, that ASP.NET is the most powerful and versatile platform for web applications at the moment.

Using DataTables More for Improving Performance
· 1

There are some features in the System.Data.DataTable class that a lot of developers don’t utilize.

AJAX and Search Engines

In the light of the immense popularity AJAX has received and the emerging tools like Atlas and AJAX.NET, I thought it was the right time to talk about the implications on search engine behaviour on AJAX enabled websites.

Converting a Date to RFC822 for RSS Use
· 7

I wrote a new dynamic RSS feed for a little project called Little Helper. It all works fine, but when I tried to validate it using FeedValidator, the pubDate was invalid.

Custom Web Controls for ASP.NET Apps

Custom web controls for your ASP.NET application are a brilliant way to separate, reuse and “refactor” your code pieces. In that sense I consider myself to be a control freak and that’s a good thing!

ASP.NET: Securing ViewState Efficiently

Even though ViewState is unreadable by the human eye, it is nothing but a base64 encoded string that easily decodes by a piece of software like this one.

Working with Weeks in C# (Not That Obvious)
· 1

For some reason, Microsoft didn’t add a Week property to the DateTime class. I never could figure out why.

ASP.NET: Remove Unused Objects From the Session

The Session in ASP.NET is a very simple way of storing user specific data for the duration of a single user session.

Adding Your Blog to IE7 Search Providers

Internet Explorer 7 comes with build in web search from the toolbar, just like Firefox have had for years now.

ASP.NET 2.0: Whitespace Removal HTTP Module
· 1

I’ve written about whitespace removal before, but I think this is the best solution so far.

ASP.NET: Permanent Redirection

The easiest way to make a redirection in ASP.NET is using Response.Redirect(url).

ASP.NET 2.0: Submit Disabled Controls
· 3

I recently built a JavaScript function in HeadLight that filled a textbox from JavaScript and then disabled the textbox to prevent the user to alter its contents.

ASP.NET 2.0: XML Membership Provider
· 10

ASP.NET ships with a SqlMembershipProvider and a ActiveDirectoryMembershipProvider that makes user authentication and authorization very easy to implement, but for some reason those are the only membership providers provided natively by ASP.NET 2.0.

Set HTML Header Items Programmatically in ASP.NET 2.0
· 1

Among the differences between version 1.1 and 2.0 of .NET Framework is the many new controls.

Using the CompilationMode Attribute to Boost Performance

ASP.NET 2.0 introduced the CompilationMode attribute to let the developers decide how to compile individual pages, user controls and master pages.

Atlas – the AJAX Engine for ASP.NET

Atlas is an ASP.NET control collection for creating AJAX enabled websites. It is also developed by the man who brought us ASP.NET some years ago, the one and only Scott Guthrie.

ASP.NET: Control the Number of Alternate Rows in GridView

The GridView control (as well as the DataGrid) has a way of defining the style of every other row of the grid.

Creating Safe Events in C#

Whenever you write class libraries, custom control or just about anything else, you probably raise a lot of home made events. That’s a simple thing to do, but tedious to write over and over again.

Use an HttpModule to Spam-proof Your Website

Every time an email address is written on a website, it allows spam robots to collect it and abuse it. If you have a website (e.g. blog or forum) that displays the users e-mail address it would be a nice service to mask it for the spam robots.

.NET Resource Editor App for .resx Files
· 7

Working with resource files (.resx) in Visual Studio 2002/2003/2005 is very easy and straightforward.

The Old Confirm Button Trick

You have probably at some point clicked the wrong input button on a web page, and something bad happened.

Use the SoapDocumentMethod Attribute to Speed Up Web Services
· 1

I’ve done a lot of web services during the last couple of years and I simply love Service Oriented Architecture using SOAP.