Almost Christmas Holidays....

Posted by: Imar Spaanjaars at Saturday, December 13, 2003 11:28:41 AM in: Imar's Blogs
Pfff, just another week to the Christmas Holidays. Really looking forward to it. Having lots of free time, hanging around with friends and family, no work pressure......
Read on ...

"Upgraded" to ASP.NET 2.0 a.k.a. Whidbey

Posted by: Imar Spaanjaars at Tuesday, December 02, 2003 9:07:17 PM in: Imar's Blogs
Today I installed an early alpha release of ASP.NET 2.0, also known as Whidbey on my server. Yeah, yeah, I know. I shouldn't install beta stuff on my production servers, but I just couldn't resist it. I guess I'll have to live with the consequences (I am typing this message directly from the SQL Server Enterprise Manager because my Login functionality broke down ;-) )
Read on ...

Howto Create a Hit Counter Using a Text File in ASP.NET 1.x

Posted by: Imar Spaanjaars at Friday, November 28, 2003 11:55:33 PM in: ASP.NET 1.x
If you have a live Web site on the World Wide Web, you may be interested in how many people are visiting your site. You can of course analyze the log files of your Web server but that information is usually difficult to read. The log files contain information for each and every request a visitor has made to your site, including resources like images, Flash movies and so on. This makes it near impossible to extract information about individual users. It would be a lot easier if you could count the number of individual users that have visited you since you started your site. It would also be useful if you could see the number of users that are currently browsing your site.

This article will show you how to accomplish these two tasks by storing the hit counters in static variables in the Global class and in a text file using code in the Global.asax file. This article extends the ideas from a previous article where the values of the counters were just stored in static variables. By writing the counters to a file you can maintain their values, even when you restart the Web server.

There is also a Classic ASP version of this article available.
Read on ...

New Hit Counter Article

Posted by: Imar Spaanjaars at Monday, November 24, 2003 10:30:47 AM in: Imar's Blogs
The first article in a series of three, describing how to create Hit Counters in ASP.NET is finished now.
Read on ...

Howto Create a Hit Counter Using the Global.asax File in ASP.NET 1.x

Posted by: Imar Spaanjaars at Monday, November 24, 2003 10:22:04 AM in: ASP.NET 1.x
If you have a live Web site on the World Wide Web, you may be interested in how many people are visiting your site. You can of course analyze the log files of your Web server but that information is usually difficult to read. The log files contain information for each and every request a visitor has made to your site, including resources like images, Flash movies and so on. This makes it near impossible to extract information about individual users. It would be a lot easier if you could count the number of individual users that have visited you since you started your site. It would also be useful if you could see the number of users that are currently browsing your site.

This article will show you how to accomplish these two tasks by storing the hit counters in static variables using code in the Global.asax file. The disadvantage of this method is that this information is lost when you restart the Web server. Two other articles on this site demonstrate how to store this information in a text file and in a database, so the value for the counter will be preserved when you restart your Web server.

There is also a Classic ASP version of this article available
Read on ...

Worked on The Site Again

Posted by: Imar Spaanjaars at Friday, November 21, 2003 9:52:40 PM in: Imar's Blogs
Today I finally had the time again to work on the site.
Read on ...

How Do I Check If a Number Is Even Or Odd in ASP?

Posted by: Imar Spaanjaars at Saturday, November 08, 2003 8:52:05 PM in: Classic ASP
Use this snippet to check whether a given number (passed in as numberToCheck is even or odd.
Read on ...

How Do I Select Duplicate Records from a Database Table

Posted by: Imar Spaanjaars at Saturday, November 08, 2003 8:33:39 PM in: T-SQL
This T-SQL snippet allows you to select duplicate records from a database table. The example assumes that the column Id is used to determine whether a record has a duplicate. If multiple columns determine whether a record has a duplicate or not, simply expand the SELECT list and the GROUP BY clause.
Read on ...

Site Update

Posted by: Imar Spaanjaars at Monday, November 03, 2003 10:20:22 PM in: Imar's Blogs
Today I finally got to updating the site....
Read on ...

Preventing a Page from Being Cached by Browsers and Proxy Servers

Posted by: Imar Spaanjaars at Sunday, November 02, 2003 5:30:19 PM in: Classic ASP
Add the following code to the top of your ASP page to prevent it from being cached by the browser or any intermediate proxy or caching server. This will force the browser to retrieve a new copy of the page, everytime it needs to display it.
Read on ... 12345678910111213141516171819202122232425262728293031