Welcome to imar.spaanjaars.com

image
Welcome to the personal web site of Imar Spaanjaars where I write about software development with a focus on Microsoft web technologies
Image representing the Blogs category

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

Published 17 years ago

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 ...
Image representing the Articles category

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

Published 17 years ago

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 ...
Image representing the Blogs category

New Hit Counter Article

Published 17 years ago

The first article in a series of three, describing how to create Hit Counters in ASP.NET is finished now.

Read on ...
Image representing the Articles category

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

Published 17 years ago

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 ...
Image representing the Blogs category

Worked on The Site Again

Published 17 years ago

Today I finally had the time again to work on the site.

Read on ...
Image representing the Snippets category

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

Published 17 years ago

Use this snippet to check whether a given number (passed in as numberToCheck is even or odd.

Read on ...
Image representing the FAQs category

How Do I Select Duplicate Records from a Database Table

Published 17 years ago

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 ...
Image representing the Blogs category

Site Update

Published 17 years ago

Today I finally got to updating the site....

Read on ...
Image representing the Snippets category

Preventing a Page from Being Cached by Browsers and Proxy Servers

Published 17 years ago

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 ...
Image representing the Articles category

Allowing Your Users to Sign Up for Your Site

Published 17 years ago

If you have a copy of the book Beginning Dreamweaver MX, I am sure you are familiar with the project TheSoccerSite. For those not familiar with the project, TheSoccerSite is a Web site where soccer fans around the world go for up-to-date information about soccer events. In 7 Chapters, Server- and Client-Side programming, using ASP, HTML, JavaScript and a Microsoft Access database were introduced. One of the features of the site was a login mechanism to protect the admin section from unauthenticated and unauthorized users.

However, with the current implementation of the login mechanism, you would have to add new users to the database directly. To do this, you'd need to download the database, add the user and then upload the database again. Fortunately, Dreamweaver has a few handy Server Behaviors that make adding a new user to the database very easy.

Read on ...

Mobile: False

Crawler: True

I: False