.NET Sample Code
-
Add a JavaScript popup to an ASP.NET button
by Edward Tanguay
How to add a javascript popup (alert) question to an ASP.NET button control.
-
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
-
I need a time-out!
by Wouter van Vugt
I need a time-out! Or more specifically, my methods need a time-out mechanism. And because I spent seven projects and quite some time on the web trying to find out how to do it correctly, I am writing this small article about the works.
-
Complex Data Binding
by Dan Glass
Complex Data Binding a collection implementing IBindingList and ITypedList
-
System Menu Classes
by Michael H
Two classes that provide system menu functionality similar to the regular Menu and MenuItem classes so that you can use regular Click events instead of overriding WndProc.
-
Virtual Stack
by Daniel Okely
This is an implementation of a stack.
-
XML/XSD Schema Validator
by joe miguel
To teach how to write XML and Schemas (or DTD's). Some of the schemas language can be difficult to understand. I needed an easy (and free) way to know if my work was correct, if not then exactly what was wrong with it. As implied above, this example will also show you how to use schemas in your own programs.
-
Clearing TreeView taking too much time
by Palo Mraz
Explores an odd feature of the System.Windows.Forms.TreeView and a simple workaround.
-
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.
-
Get Current Username in VB.NET
by Walter Steed
Demonstrates how to use the GetUserName API in VB.NET
-
Databinding SqlTypes
by Dan Glass
Demonstrates how Databind the SqlTypes using the PropertyDescriptor class and the ITypedList Interface.
-
Send File to Recycle Bin in VB .NET
by Walter Steed
.NET version of "Send file to Recycle Bin"
-
Using the NotifyIcon control
by Colin Harman MACITP
This short article describes how to use the NotifyIcon in your applications and how to add menus to the icon.
-
C# String Functions and Manipulation
by Colin Harman MACITP
Learn how to manipulate C# strings using built-in and custom functions. The code provided shows how to trim, find, search, replace and split strings, convert to upper case and proper case and more.
-
Create Controls At Runtime
by Colin Harman MACITP
Shows how to create controls at runtime and set their properties
-
Data Entry Validation with Error Provider
by Colin Harman MACITP
This example code uses the errorProvider control which ships with c# to validate data entry and shows the error icon if validation is not correct
-
Listing Files & Folders in a directory
by Colin Harman MACITP
Retrieves all files and folders within a specified folder location, along with the file size and extension.
-
How to delete records with SqlCommand
by Edward Tanguay
This code shows you how to delete records with an SQL statement and get the number of records deleted returned back as an integer.
-
Placing results from DataReader into an Array
by Edward Tanguay
Since a connection cannot be used until a DataReader has been closed, it is quite often necessary to read the results of a DataReader into an array, then close the DataReader, then you can process the data in the array while you use the connection for something else. This shows you how.
-
A Chat Client/Server Program for C#
by Michael H
Source code for a chat server, and the accompanying client program.