Beans' Place
  Home://      \\ Back              
Programming
Family
Lime Bay

 

© 2002-2008
www.beanland.net.au
 

ASP.NET Controls & Code

This code is written for ASP.NET 2.0 using VB.NET and are tested on IE 7 / Firefox 2.

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.
DownloadDemo
Version: 1.35, Mar 2007Screenshot
Documentation
 

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
Documentation
 

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
DownloadDemo
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.
Download
Version: 1.0, Jan 2006
Documentation
 

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.
DownloadDemo
Version: 1.5.2, Feb 2008Screenshot
Documentation
 

SMTP 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 (for the time being at least) as I found a better way to read email - the old ClassicASP way. Create a reference to Microsoft CDO for Windows 2000, then you can use the CDO object to do everything - easy.
Download
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.
Download
Version: 1.0, May 2005
 
 
This code is also available on Planet Source Code
PayPal