ASP.NET Controls & Code

This code is written for ASP.NET 2.0+ using VB.NET.

The controls contain the full source code. You can download them, modify them and use them freely. I do ask you send me any useful modifications and/or comments you think will benefit other people (seeing as you got the code for free).

NOTE: Most of these links open in another window.

Debug Panel (User Control)

Debug Panel is a VB User Control useful for enhancing the ASP.NET trace panel by adding a few missing items such as: A navigation index (which shows only the section you want and hides all other sections); A JavaScript debugger and basic DOM walker; ability to show the debug panel when Trace is disabled in .NET (user specific); and a lot of other useful information. By placing 2 lines of code in your footer/master page this control will be added to the top of the .NET trace panel.
Version: 1.35, Mar 2007Screenshot

Excel 97-2003 BIFF (binary file) NPOI Reader/Writer Helper

This NPOI wrapper/helper aims to make reading and writing of Excel files extremely easy (only a few lines to read or write an entire sheet), then exposes the NPOI object so you may do other more advanced operations. NPOI is a little known .NET port of an Apache project to create an open source Microsoft Office 97-2003 file reader and writer (without using or having Microsoft Office installed). NPOI has various examples included, but they are basic, disjointed and the API is complex for many people's usage. My VB.NET / C# code makes it very easy to read an entire worksheet or update or write new sheets with some formatting. I have also included extra functions to export a DataTable or GridView to an XLS file. This class is not meant to be the be all and end all of Excel reading and writing. It is just meant to give you a "leg up" so you can to do the basics or get started with NPOI. This class, with a few unreleased extras specific to my apps covers 95% of my corporate usage - so i hope it helps other people out too.
Version: 2.2, Nov 2011

Excel file read/write via ADO or OLE classes

ExcelADO is a VB class which allows you to open an Excel file via ADO. The class object includes several easy to use methods to read and write data into an excel file. For more advanced features, the class allows you to manipulate the DataSet (DataTable or DataRow) directly.
ExcelOLE is a VB class which allows you to open an Excel file via OLE Automation (COM). The class object includes several easy to use methods to read and write data into an excel file. For more advanced features, the class allows you to manipulate the Excel Workbook directly.
MS Excel must be installed for these classes to work.
DownloadADO Demo, OLE Demo
Version: 1.03, Nov 2006Screenshot

HTMLText converter (class)

This code is an ASP.NET (VB) class which converts HTML to Text and Text to HTML while preserving as much formatting a possible. HTML2Text formats links to URLs, unencodes the HTML, removes styles, scripts, and of course HTML tags. Spacing and formatting are also cleaned up. Text2HTML formats URLs to links, observes line feeds, tabs and spacing. It also does HTML encoding. An extra function to detect if HTML tags exist in the text is also included. HTML2TXT, HTM2TXT, TXT2HTML, TXT2HTM, TXT
Version: 2.1, Apr 2007

ReScroller (Custom Server Control)

This code is an ASP.NET (VB) custom server control to maintain the browser's scroll position after postback. Unlike the .NET/IE SmartNavigation feature, it works with all browsers and does not produce weird quirks.
Version: 1.0, Jan 2006

Stemmer - Porter2 aka SnowBall Word Stemming Algorithm

This is a VB.NET implementation of Martin Porter's "Porter2" aka "SnowBall" word stemmer algorithm. This algorithm does not always produce a correctly spelled word. ie "Services" becomes "Servic" (typically "e" suffixes are an issue) as English does not strictly follow rules. This is very good, but the best we can hope for without using a dictionary lookup. It is good enough for searching or matching purposes - which is probably what you want to do. Alternatively you could use dictionaries to stem words - which is generally too big and an overkill for most usages.
Version: 1.0, Apr 2010

Tab Control (Custom Server Control)

This code will create an ASP.NET custom server tab control similar to what you would expect from a Windows application. It allows you to organise areas of your page or pages into tabs and for the user to select the tab to show the information neatly. By copying 1 folder of files to your site and adding a few lines of code to your page, you can have this control up and running in no time. The result is a professional looking, and familiar Windows style tabbed interface. You can also optionally add icons to each tab and set many interface settings. Tested under IE, Mozilla and Firefox. Includes VS2002 & 2005 (.NET 1.1/2.0) solution files.
Version: 1.5.2, Feb 2008Screenshot

MICR E-13B source and language files for Tesseract

This archive contains compiled Tesseract 3 and 2 language files and source training files for the MICR E-13B font found on the bottom of cheques. This language file can be used with Tesseract 2 or 3 (there is a different set of files for both), TessNet2 or TesseractDotNet.
Version: 2.0, Jul 2011

SMTP/MIME Email parser (Code snippet)

This code is the beginning of an SMTP email parser (there is no native .NET 2.0 class to do this - crazy. You can send them, but not read them). I tried to make this code as compact and as simple as possible - at least in the 1st version! Sorry if my techniques are a bit dodgy - least it works. Anyway, this is where I got up to. It runs and reads encoded emails, but it doesn't read the attachments or decode the QuotedPrintable bits yet, but that can be added fairly easily (framework is there already for this). I abandoned this code as I found a better way to read email rather than creating a reference to the obsolete Microsoft CDO for Windows 2000. LumiSoft.Net's Mail and MIME parser is the best free component around.
Version: 0.1, Mar 2007

AJAX HTTP Request (Client Side Callbacks for .NET 1.0/1.1)

AJAX (Asynchronous JavaScript and XML) HTTP Requests, (which Microsoft is calling CallBacks in .NET 2.0) is where a piece of JavaScript can call a server side (ASPX) page to obtain a result - without the user knowing (no popup windows). It is used increasingly often in populating the next level in a series of linked drop down lists and progress bars. This code is a fault tolerant JS script file with demo. Works for all recent browsers.
Version: 1.0, May 2005
This code is also available on Planet Source Code