© Simplicity ASP Framework - v .01 b

HTML Table Class

This classes uses array or a SQL query to produce a basic table. I find this class great when making reports or using it with the pagination class.


dim data(1,1)
data(0,0) = "Value 1.1"
data(0,1) = "Value 1.2"

data(1,0) = "Value 2.1"
data(1,1) = "Value 2.1"

Set createTable = New htmlTable
	createTable.caption 	= "Sample Table"
	createTable.headers 	= array("Title 1","Title 2")
	createTable.array_data 	= data
	LocalStr = createTable.build()
Set createTable = Nothing
Response.write	LocalStr

Sample Table
Title 1Title 2
Value 1.1 Value 1.2
Value 2.1 Value 2.2
Definitions for HTML Table Class
caption optional Text This is the title for this table.
headers optional Array This Array builds the headers for the table
sizes optional Array this Array sets the sizes of the TD's in the table
table_style optional Text This adds the table style, ie ID="table_style"
td_style optional Array This array sets additional styles to the TD's in the table
altRows optional TRUE or FALSE (boolean) Sets if we should set the ALT rows for the styles
array_data Required Array An Array of data to build the table.
array_type optional 1 or 2 Sets if a single or multidimensional Array
sql_conn Required Number The Connection Number for the database. A complete list here
sql_stmt Required Text SQL Statement to be executed.
build Required   This is the statement that builds the table for the output.

© Simplicity ASP Framework
Last Modified on: 3/4/2009 7:54:52 PM
Page Executed: 0.031 seconds