Sample Code
-
How to convert a string to a date
by Edward Tanguay
Finding out how to convert one type to another in .NET is tricky. Here is the answer to converting a string to a DateTime type.
-
Determine execution time in PHP
by Gringod
This is based on the ASP script posted by Lio. It will determine the time taken for a php script to execute correct to 0.000000000000001 seconds.
-
How to create XML files
by Edward Tanguay
How to generate XML files in PHP using its new_child function.
-
How to get the current SessionID
by Edward Tanguay
Demonstrates how to retrieve the current SessionID for storing session data in a database
-
Making a .NET app run on Vista with Administrator priviledges
by James Crowley
If you're targeting Windows Vista and your application requires administrator priviledges (such as accessing the program files directory), then it will fail unless you include a manifest so Windows knows. Here's how.
-
Asynchronous HttpWebRequest
by Steven Cohn
Demonstrates how to build a much more responsive and user-friendly application by using asynchronous HttpWebRequests.
-
Simple Key logger
by Jamie Lindgren
I'm working on a real keylogger, and I was researching how to do them, and after a bit of thinking I came up with this code...
-
CSS font shorthand rule
by Trenton Moss
Learn how to shorten those CSS font rules.
-
Sending email using SMTP and Java
by Kevin Saitta
How to send an email using an SMTP server and Java
-
Adding controls to PlaceHolders dynamically
by Edward Tanguay
A simple example demonstrating how to dynamically add controls to a PlaceHolder control.
-
Get host name from IP address, and vice versa
by James Crowley
Resolve a host name to it's IP address, and an IP address to its host name with this re-usable class module
-
Merge an .exe and a .dll into one .exe
by Edward Tanguay
How to merge an .exe and a .dll into one .exe using ilmerge in VS.NET
-
Programatically Load User Controls
by Dave Wanta
How to programatically load user-controls from code behind pages and then access their properties using reflection.
-
How to check to make sure a URL is valid
by Edward Tanguay
A neat bit of code that checks if a domain is valid and actually exists.
-
CSS Positioning Within a Container
by Trenton Moss
One of the best things about CSS is that you can position an object absolutely anywhere you want in the document. It's also possible (and often desirable) to position objects within a container. It's simple to do too.
-
Generate PDFs using C# and the free iTextSharp library
by James Crowley
Learn how to use the free iTextSharp library to load a PDF form, populate some dynamic fields, and then save out a flat PDF file.
-
User-Friendly Validation using ErrorProvider
by Tim Dawson
Data entry is a very important part of a lot of applications. It is important to validate data as it is entered without disturbing the user. Enter the ErrorProvider component.
-
Open a file/url with its default program
by James Crowley
How to open a file, url or email address with its default program
-
Get the visitor's IP address
by James Crowley
How to get the visitors IP address from within your ASP script
-
Customize XML Serialization using IXmlSerializable
by James Crowley
Learn how to implement the IXmlSerializable in order to customize serialization of your objects - for instance, serializing a NameValueCollection.