How Do I Print From Internet Explorer Without Raising a Confirmation Dialog?

Posted by: Imar Spaanjaars at Thursday, February 05, 2004 8:05:51 PM in: Scripting
Update!! 11-29-2005
There seems to be a problem with the code presented in this article, so don't rely on it work anymore. When you click the print button you get an error and nothing gets printed.

So far, I haven't been able to isolate the problem or come up with a solution. It looks like this problem is caused by some security mechanism in Windows XP Service Pack 2. I haven't tested various versions of IE and Windows XP yet, but I am sure it doesn't run on IE 6, SP2 with Windows XP SP2 (well, it doesn't run on *my* IE 6, SP2 with Windows XP SP2 ;-) )


In some scenario's, it could be useful if you were able to print a page from within the browser, without the Print dialog popping up, and without the user confirming the print operation.
Read on ...

Beginning Dreamweaver MX 2004 Released

Posted by: Imar Spaanjaars at Thursday, February 05, 2004 4:08:00 PM in: Imar's Blogs
A few days ago, Beginning Dreamweaver MX 2004 has been released. I am still waiting for my copies, shipped to me a couple of days ago, but the book is available from Amazon and other on-line bookstores. Go check it out, if you want.
Read on ...

Searching TheSoccerSite With Dreamweaver MX

Posted by: Imar Spaanjaars at Thursday, February 05, 2004 3:39:25 PM in: Web General

More and more Web sites these days are database-driven. That means that most of the content, customer data, site statistics and maybe even information used for the navigation menu or other layout purposes is stored in a database.

With all that data stored in a database, you also need to provide a means to let your users search for it in the database. Since this information is not file based, you can no longer use tools like Index Server that index the contents of physical files. Instead, you'll need to code the query logic yourself. For each database-driven application, the search facility will be different, because usually your back-end database and the front-end requirements are different. However, part of code can easily be reused in other projects. In this article, I will focus on building a search facility for TheSoccerSite, a database-driven soccer fan site that was created in section 2 of the books Beginning Dreamweaver MX and Beginning Dreamweaver MX 2004. Although the implementation will be specific for the Soccer Site project, you'll get enough background to successfully implement a search facility on your own Web site.

Read on ...

How Do I Hide Screen Elements When a Page Is Printed?

Posted by: Imar Spaanjaars at Tuesday, February 03, 2004 8:42:36 PM in: CSS
It's often useful to hide certain elements when a page gets printed. For example, your Navigation Menu, or a Search button are usually pretty useless on paper.
Read on ...

Finished the Article Series on Hit Counters

Posted by: Imar Spaanjaars at Sunday, January 18, 2004 9:35:14 PM in: Imar's Blogs
By publishing the article Howto Create a Hit Counter Using a Database in ASP.NET I finished up the article series about Hit Counters in ASP and ASP.NET
Read on ...

Howto Create a Hit Counter Using a Database in ASP.NET 1.x with C#

Posted by: Imar Spaanjaars at Sunday, January 18, 2004 2:53:40 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 shared variables in the Global class and in a database using code in the Global.asax file. The counters in the shared variables are used to display them on a page in your Web site; either as a counter so your visitors can see it as well, or somewhere on a page in your Admin section, so only you have access to them. By writing the counters to a database you can maintain their value even when you restart the Web server, while you still have a fast and scalable solution.

This article extends the ideas from two previous articles where the values of the counters were just stored in static variables in the Global class and in a text file.

There are also Classic ASP and VB.NET versions of this article available.
Read on ...

Singleton Class

Posted by: Imar Spaanjaars at Friday, January 16, 2004 5:08:08 PM in: C#
This article is considered obsolete. Take a look here instead. This snippet shows you how to implement a Singleton class in C#.
Read on ...

Large Site Update

Posted by: Imar Spaanjaars at Thursday, January 15, 2004 1:38:38 PM in: Imar's Blogs
Today I have updated the site again. You won't be able to see most of the changes, as I mainly updated the back-end of the system.
Read on ...

Measuring the Size of an Image with VB.NET

Posted by: Imar Spaanjaars at Tuesday, December 30, 2003 7:27:25 PM in: VB.NET
It can be useful to be able to retrieve the Height and Width of an image file you have on disk. The following snippet shows you how to do that:
Read on ...

Measuring the Size of an Image with C#

Posted by: Imar Spaanjaars at Tuesday, December 30, 2003 7:22:58 PM in: C#
It can be useful to be able to retrieve the Height and Width of an image file you have on disk. The following snippet shows you how to do that:
Read on ... 12345678910111213141516171819202122232425262728293031