View Single Post
  #9 (permalink)  
Old March 8th, 2004, 02:40 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I guess it *does* work, but only for a split-second (a pico second, on fast or tuned systems ;) )

The Page_Load event fires when the page loads. However, as soon as the page has finished loading, all variables declared inside the method body get out of scope and are destroyed. So, only during the Page_Load event at the server will this code (technically) work.

A FileSystemWatcher is more suitable in desktop or Service applications.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote