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.

Cancel Flash Requests with JavaScript

Internet Explorer can only make 2 connections at a time, which means that only two elements can be loaded while the rest is queued up.

C#: Realtime Currency Exchange Class

Soon, I’m facing a new project where the need for up-to-date currency exchanges is crucial.

ASP.NET 2.0: Health Monitoring

The ASP.NET 2.0 provider model has once again amazed me.

Using FxCop with ASP.NET 2.0

The build process in ASP.NET 2.0 is very different than in ASP.NET 1.x, because it does not produce a dll file.

Removing Nulls from a DataTable
· 1

The individual cells in a DataTable can have a null value in the form of System.DbNull.Value.

XML Country List File
· 5

Today, I had to bind a list of countries to a drop down list in ASP.NET 2.0. I wanted to use an XML file to store the countries. There are more than 200 so there was not way I was going to hard code them in the HTML.

Compact an Access Database from .NET

Over time, a database becomes fragmented when it is used. This makes it grow in size and perform badly. Not the two qualities you want for your mission-critical data.

ASP.NET: Maintain Scroll Position After Postbacks

To maintain the scroll position after postbacks is important for larger web pages in order to let the user know exactly what is going on.

Validating Strong Passwords in C# and ASP.NET
· 1

It’s always a good idea to have a password policy when creating new applications. A password policy can vary from project to project, but the important part is just to have one to begin with.

ASP.NET: A simple factory using Generics
· 3

For about a week ago one of my readers asked me to simplify a piece of his code.

ASP.NET 2.0: Asynchronous Pages
· 1

In ASP.NET 2.0 it is now possible to create asynchronous pages in a very simple and easy way.

Localized Websites and the html Tag

For a website that supports multiple languages, it is important to tell the client what the selected language is.

Web Accessibility from Within

Accessibility is an abstract concept for the average web designer/developer, because he or she has never needed accessible web pages.

If/else-statement Performance Optimization
· 1

Have you ever considered how well a regular if/else-statement performs? I haven’t, but after watching this Channel9 video I wanted to test it.

GZip vs. Deflate – Compression and Performance
· 10

After I wrote about a HTTP compression module in ASP.NET 2.0 one of my colleagues pointed out that the Deflate compression is faster than GZip.

App_Code: Why it’s Better

I remember when ASP.NET 2.0 beta 1 was released about 2 years ago and I eagerly tried it out.

ASP.NET: Remove HTML Comments at Runtime
· 1

I’ve been playing a bit with regular expressions lately and have to find some useful tasks in order to practice the skill.

ASP.NET: Remove HTML Tags From a String
· 15

A lot of websites allow users to input text and submit it to the site.

Retrieve Subdomain from a URL in C#
· 6

I had to come up with a method that retrieved the subdomain from the current web request on an ASP.NET website.

Refactoring Your ASP.NET Project

One day at work i was refactoring my code as I do everyday, when it suddenly hit me that our ASP.NET projects were also refactored in a sense.

Convert HTML Tags to Lower-case for XHTML Compliance
· 3

The XHTML definition demands all tags to be lower-cased.

JavaScript: Alert.Show(message) from ASP.NET Code-behind
· 18

In highly interactive websites and intranet sites, you probably want to let the users know what’s going on when they delete, save, export etc. on the site.

ASP.NET: Export a DataTable to Excel
· 32

Back in February I wrote a post on how to export DataTables to XML and Excel and I still get a lot of search engine traffic to that post.

ASP.NET: HttpModule for Moving ViewState to Bottom
· 4

There are two reasons why it is desirable to do so.