Posted by: Imar Spaanjaars at Sunday, May 16, 2004 11:15:42 AM in:
.NET General
This snippet shows you how to retrieve the directory of the "current" .NET Framework. The path returned is the location of the version of the .NET Framework that your application is using.
Read on ...
Posted by: Imar Spaanjaars at Sunday, May 16, 2004 10:33:00 AM in:
.NET General
This snippet shows a Regular Expression for a strong password.
Read on ...
Posted by: Imar Spaanjaars at Sunday, May 16, 2004 10:30:43 AM in:
Visual Basic 6
The following snippet shows you how to change the current printer with Visual Basic 6 code.
Read on ...
Posted by: Imar Spaanjaars at Saturday, May 15, 2004 10:01:45 AM in:
JavaScript
The following JavaScript code can be used to preselect an item in a drop-down list.
Read on ...
Posted by: Imar Spaanjaars at Saturday, May 15, 2004 9:53:18 AM in:
JavaScript
In HTML, it's pretty easy to preselect an item in a drop-down list. At design-time, or with a dynamic server page, at run-time at the server, all you need to do is add the selected attribute to the <option> element you want to select. If you want to select the item programmatically through JavaScript code, you'll have to follow a different route.
Read on ...
Posted by: Imar Spaanjaars at Friday, May 14, 2004 8:22:38 AM in:
.NET General
Because the naming scheme of embedded resources is sometimes a bit awkward (you have to take the Default Namespace, folder names and resource file names into account), it can be useful to display a list of all embedded resources in your assembly with their Fully Qualified names. Put the following code in a method, like the constructor for your control for example, to get all the names in the Output window.
Read on ...
Posted by: Imar Spaanjaars at Sunday, May 09, 2004 4:52:33 PM in:
Security
Many Web sites these days use databases or text files to save information. To be able to save this data, IIS, the Web server, needs the required permissions to write to the disk or database. This FAQ will explain how you should configure your NTFS disk or database so your Web application can write to it.
Read on ...
Posted by: Imar Spaanjaars at Sunday, May 09, 2004 3:18:33 PM in:
Security
It's important to understand the account that IIS is running under when you need to make changes to the security settings. If, for example, your Web application writes to files or to a database, you'll need to grant the correct permissions to the folder or database. Before you can change these security settings, it's important the know what account IIS is using. This FAQ details the various options available, both for "classic" ASP and ASP.NET applications.
Read on ...
Posted by: Imar Spaanjaars at Sunday, May 09, 2004 2:34:46 PM in:
Security
You often need to make changes in the security settings of your NTFS disk, for example to allow your Web server to read or write to certain files. You make these changes on the Security tab of the Properties dialog for the file or folder you are working with. However, on a Windows XP computer that is not part of a network, this tab is often not visible. Follow these steps to enable this tab.
Read on ...
Posted by: Imar Spaanjaars at Sunday, May 09, 2004 1:25:13 PM in:
ADO
When you need to insert a null value into a column in an Access database, you could use "" to indicate a zero-length string. However, a zero-length string is not the same as Null. To insert a Null value, simple pass the keyword Null for the column, as shown in the code example.
Read on ...