.NET Sample Code
-
Debugging client JavaScript in VS 2005
by Jimmy Skowronski
Short guide how to debug client JavaScript in VS 2005.
-
A Simple ASP.NET MessageBox Class
by Lee Gunn - .NET C# Scotland
When moving from Windows Forms to ASP.NET Web Forms, an API that may be missed is that offered by the System.Windows.Forms.MessageBox Class. Here we implement it for ASP.NET!
-
Calculate Age
by James Crowley
How to calculate someone's age from their birth date.
-
Custom Word Wrapper
by David Cumps
A nice little class that takes some text, and will automatically wrap it according to a specified width.
-
Capture a Screen Shot
by James Crowley
Demonstrates how to capture a screen shot of the entire desktop, or a particular window in C# or VB.NET.
-
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.
-
Complex Data Binding
by Dan Glass
Complex Data Binding a collection implementing IBindingList and ITypedList
-
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.
-
How to create PDF files from ASP.NET pages
by Edward Tanguay
How to create PDF files from ASP.NET pages with Crystal Reports without using Visual Studio.NET
-
ASP.NET Graphical Page Hit Counter
by Raam Kumar
Generate graphics on the fly to provide a graphical page hit counter, storing the counter in a text file or SQL database.
-
Health Monitoring in ASP.NET 2
by
This is a code sample for using health monitoring...
-
Sorting and Searching Using C# Lists
by Craig Murphy
The support for lists in C# 2.0 makes sorting and searching very easy. This code snippet demonstrates how to create a list of Person objects (with name and age attributes), sort by name, sort by age and search based on age.
-
Printing with formatting in VB.NET
by Jereme Guenther
This code demonstrates how to print formatted text using VB.NET, with a a printing class which allows text to be formatted at the character level.
-
Using ASHX files to retrieve DB images
by Harry Pierson
Learn how to use the little-known Http Handler functionality of ASP.NET to serve images from a database.
-
Manipulate Multiple Windows Forms Controls
by Richard
This is just a simple program to show new .NET developers how to enumerate controls in a form and manipulate them.
-
Using the Credential Management API
by Alan Dean
Following secure development best practice, an application should obtain and store user credentials securely. Microsoft has provided a means to accomplish this on the desktop: the unmanaged Credential Management API, which exposes the capability to provide a standard login experience for the user which is also secure. This code demonstrates how to create a generic dialog implementation using this API.
-
Save a Stream to a File
by James Crowley
Demonstrates how to write a stream to a file.
-
Get Current Username in VB.NET
by Walter Steed
Demonstrates how to use the GetUserName API in VB.NET
-
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.
-
Sending Email With an Attachment
by James Crowley
A simple bit of code demonstrating how to use the MailMessage object to send an email with an attachment.