Spam proof your website using an HttpModule

Oct 31, 2006
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. The safest way to display an e-mail address is to break it up and convert it to something like “name at company dot com”. However, there are a lot of problems involved with that approach. It is difficult to read and you can’t make ... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Speed up web services using the SoapDocumentMethod attribute

Oct 30, 2006
I’ve done a lot of web services during the last couple of years and I simply love Service Oriented Architecture using SOAP. The power of using services as a means to create large connected systems are enormous but sometimes it can be a performance bottleneck. The SOAP protocol in ASP.NET is defined as a response/request operation even if the method returns a void type. That means that the requesting client waits until it gets a response from the web service and that c... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

A better string control in ASP.NET

Oct 26, 2006
Whenever I had to add a string to a web controls control collection I’ve always used the Literal control like this: Literal str = new Literal(); str.Text = "hello world"; Page.Controls.Add(str); I have always thought a Literal was too cumbersome to use for a simple thing like adding a string to a controls control collection. Then, the other day, I found the LiteralControl while browsing through the MSDN docs and that m... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Validate a URL using regular expressions

Oct 24, 2006
Today, I had to build web form that took user input from standard ASP.NET input controls. In one of the text boxes the user must to enter a valid URL, so I had to make some validation logic. But first of all, I had to find out what kind of URL’s we would accept as being valid. These are the rules we decided upon: The protocol must be http or https Sub domains are allowed Query strings are allowed Based on those rules, I wrot... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Where is .NET?

Oct 22, 2006
The developer community has gotten big on the Internet the last couple of years – very big. New blogs are constantly adding value to the blogosphere which seem to grow by the second. There is no doubt in my mind that this trend is a bonus for us developers, because we can now find multiple solutions to almost every problem we face in our daily professional life.   Being a .NET developer I subscribe to a lot of .NET related ... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Export a DataTable to Excel in ASP.NET

Oct 22, 2006
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. People have been asking me to simplify the example and only concentrate on the Excel export, so that’s what I will do now. All spreadsheet applications (Excel, Calc etc.) understand semicolon separated files natively, so everyone can use this method – you don’t even have to use Excel for it to work. public stati... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Server-side and client-side caching in ASP.NET

Oct 19, 2006
Caching is a very easy solution to many performance related issues on almost any website. There are many different ways to use server-side caching and they all have their own unique advantages. But client-side caching is often ignored in the .NET blogosphere even though it is just as important as the server-side cache. Everywhere server-side caching is used you can and should use client-side caching as well. Even though the server can serve cached ASP.NET pages ... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

IE 7 final release is here. Come get it

Oct 18, 2006
IE 7 final will be released very soon, but already now you can download it. The final version number is 7.0.5730.11. It doesn’t appear to be much different from the last beta. I've just downloaded it and the installation went seamless with no problems from my antivirus program or anything else of the sort. This means that it now is time for all you web developers to make sure that your website(s) will look great in IE 7. My experiences are a bit mixed, because there are s... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Set HTML header items programmatically in ASP.NET 2.0

Oct 18, 2006
Among the differences between version 1.1 and 2.0 of .NET Framework is the many new controls. Even though most of them don’t add new functionality they make a lot of things much easier and cleaner than before. Some of these new controls in ASP.NET are the HTML controls HtmlHead, HtmlMeta and HtmlLink. They don’t add much new functionality by them selves, but look at how clean the code becomes when you use them: protected void Page_Load(object sender, Eve... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Traditional developers vs. web developers vs. CSS

Oct 17, 2006
In the year of 2006 it can be hard to avoid doing web development to some extend no matter what kind of developer you are. The lines between the traditional windows applications and the more web based ones have become grayer. Today, a lot of developers blog about web technologies and it is very easy to spot if the developer is rooted in traditional programming using VB, C++ etc. or from a web root like PHP or ASP.NET. It’s very obvious when you look at the diffe... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

About the author

Mads Kristensen

Mads Kristensen
Program Manager at the Microsoft Web Platform team and founder of BlogEngine.NET.

More...

Month List

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.