Welcome to imar.spaanjaars.com
How Do I Detect Design-Time Vs Run-Time in a .NET Control?
Published 21 years ago
When you're designing custom controls in Visual Studio .NET, you'll often need to distinguish between design-time and run-time. You could, for example, load a static image, or create a made-up DataSource at design-time while you use a real image or DataSource at run-time. The following snippet allows you to determine whether you're currently in design-time or not.
Read on ...
How Do I Insert 'Now Playing' Info to my Posts on P2P?
Published 21 years ago
Over the past few weeks, I received numerous e-mails from P2P contributors asking me how I was able to insert information in my signature at the Wrox P2P forum about the music I am listening to when I make the post. Some wondered if I had nothing to do at all, and had all the time in the world to insert this information manually. Others already had the idea I had automated this process and were interested in the technical solution of this, rather useless, feature.
In this article I'll explain where I got the idea for this automated signature, what techniques and concepts were involved, and where I found the information required to build the solution.
Read on ...
How Do I Setup IIS to Allow it to Use Network Resources?
Published 21 years ago
If you're working with files (creating, copying, deleting etc) in your ASP applications, you have probably configured the permissions for the IUSR_MachineName account so it is allowed to write to the folder where your files reside. However, if you want to write to a folder on another machine you'll run into problems. This FAQ describes a few common scenarios to overcome these problems.
Read on ...
Logging Errors to the Event Log in ASP.NET Applications
Published 21 years ago
Let's face it. We're not living in a perfect world. I am not a perfect programmer, and the same probably applies to you (otherwise you would be stinkin' rich, laying on the beach somewhere drinking a Bacardi and Coke, instead of reading this article).
Because we aren't perfect, we know we are going to run into errors in the
applications we write sooner or later. This article will explain how you
can catch these errors in your ASP.NET applications and log them to the
Windows Event log, so it's easy to review them later. The article focuses
on ASP.NET, but the principle applies to other .NET applications as well.
New Author for Imar.Spaanjaars.Com
Published 21 years ago
I would like to welcome a new author for my Web site. Peter Lanoie has offered to contribute articles and FAQs to my Web site whenever he finds something interesting to write about.
Read on ...
How can I make a class variable accessible from different object instances of the same class?
Published 21 years ago
You may have the need to be able to access the same instance of a class variable from multiple object instances of that class. This is known as a "class" scope variable. Here I'll explain how it's done.
Read on ...
How Do I Enable Visual Styles in My .NET Win Forms Application?
Published 21 years ago
With the .NET Framework 1.0 it was
already possible to enable Visual Styles for your .NET Windows Forms so the
application took on that shinny new Windows XP look. Enabling Visual Styles
was quite a hassle, though. You had to create a manifest file that contained
a lot of
gobbledygook and it wasn't as straight-forward as you'd hope.
With the .NET Framework 1.1, however, things have become much easier.
How do I Handle Errors and Send an Error Notification from ASP.NET Applications?
Published 21 years ago
How do I set up my ASP.NET Web application to notify me with the details of an error when one occurs on my Web site? And how do I give the user a friendly message telling them an error has occurred?
Read on ...
How Do I Retrieve the Location of the Temp Folder for the Current User?
Published 21 years ago
When you're working with files, it is sometimes necessary to write to temporary files. Of course you could drop those files in the application's folder, but it's good practice to save those files in the user's Temp folder instead. This snippet will return the full path to the user's temp folder, e.g.
C:\Documents and Settings\Imar\Local Settings\Temp\, so you know where to save your temporary files.
For this code to work, you'll need to import the System.IO namespace.
How Do I Retrieve the Location of the Temp Folder for the Current User?
Published 21 years ago
When you're working with files, it is sometimes necessary to write to temporary files. Of course you could drop those files in the application's folder, but it's good practice to save those files in the user's Temp folder instead. This snippet will return the full path to the user's temp folder, e.g.
D:\Documents and Settings\Imar\Local Settings\Temp\, so you know where to save your temporary files.
For this code to work, you'll need to import the System.IO namespace.
Mobile: False
Crawler: True
I: False