.NET Sample Code
-
Forms Authentication Against An XML File
by Orcs Web
The code demonstrates how to validate a username and password against an XML file.
-
Modify a Window's System Menu
by Steven Cohn
How to add an additional menu item to a windows system menu.
-
Asynchronous HttpWebRequest
by Steven Cohn
Demonstrates how to build a much more responsive and user-friendly application by using asynchronous HttpWebRequests.
-
Resizing images retrieved from SQL server
by Simon Soanes
A neat way of fetching an image stored in SQL Server and resizing it before save/sending it anywhere.
-
Validating an Integer
by Simon Soanes
How to validate an Integer the fast/efficient way in C# using Double.TryParse()
-
Debug ASP.NET pages using Tracing
by Julian Roberts
Demonstrates a useful debugging technique taking advantage of traces in ASP.NET.
-
Embed text in Image using ASP.NET
by Julian Roberts
Demonstrates how to dynamically embed a text caption embedded into an image.
-
Custom Word Wrapper
by David Cumps
A nice little class that takes some text, and will automatically wrap it according to a specified width.
-
IE Browser Helper Objects
by Steven Cohn
A demonstration of how to implement an IE Browser Helper Object in C#
-
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.
-
How to run through multiple DataReader results
by Edward Tanguay
You can save code by piling SQL statements into one SqlCommand and then getting a DataReader with multiple result sets.
-
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.
-
A PagingRepeater control
by Dan Glass
A PagingRepeater control extending Repeater with page navigation
-
Create Hashes - MD5, SHA1, SHA256, SHA384, SHA512
by David Cumps
In PHP its a simple task to generate hashes, but in C# it takes a little more work. We'll create a Hash class to simplify the process.
-
RSS Feed Helper Class
by James Crowley
A simple helper class to make generating an RSS feed a piece of cake - its the one we use on Developer Fusion too!
-
How to access a MySQL database with .NET
by Edward Tanguay
Demonstrates how to connect to a MySQL database with C#.
-
UI Threading Helper Classes
by Roy Osherove
One of the most cumbersome things you will ever have to do with Winforms is updating your User interface while receiving events from another thread. These helper classes make it a breeze.
-
Executing a .CS file
by David Cumps
Demonstrates how to write a C# program that can "launch" a .cs file and execute it.
-
Associating your program with every file
by David Cumps
Learn how to add a program to the shell right click menu for every file.
-
CExtStatusControlBar - Managing status bar's panes
by Dmitriy Yakovlev
An enhanced status bar which allows you to easily add/remove almost any controls to/from its panes, on-the-fly.