The thread pool gives you an easy and safe way for creating multithreaded applications, and even though the stateless nature of the Internet isn’t the best place for multithreading, it can still be the right thing to do...
Recently, one of my readers asked me how to block certain IP addresses from accessing his ASP.NET website. It was a good question that could be answered in multiple correct ways. My answer was a plug ‘n play HttpModule...
Most of the primitive types in the CLR have a Parse method that takes a string and parses it into its own data type. I could be DateTime.Parse(string) or Int.Parse(string) etc. It’s a great way of doing late binding and...
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. That means that you cannot use FxCop because it can only work with dll and exe file types. However, there is...
If you need a list of time zones for your user to pick from, you probably want a dropdown list. Then you just need a list of time zones to bind to the dropdown list. Unfortunately, the System.TimeZone class doesn’t...
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. It is good usability and something you would expect in modern web applications. In...
For about a week ago one of my readers asked me to simplify a piece of his code. The code was translating the different tags used by blog comments, such as [url][/url], [img][/img] etc. as we know from WordPress. It was...
Yesterday, I wrote about the Ping class for checking network availability on remote machines. Then I started thinking about checking the availability of web servers. Even if a remote server is available over the network...
In ASP.NET 2.0 it is now possible to create asynchronous pages in a very simple and easy way. It gives you a whole new abstraction layer on top of the managed thread pool that let’s any webpage take advantage of...
I’ve been playing a bit with regular expressions lately and have to find some useful tasks in order to practice the skill. So, today I wanted to make a little method that strips HTML comments from an ASP.NET webpage at...