<%@ Page language="vb"%>
Page in old ASP style
Uses old style page creating by direct code instead of use Page_Load event, uses <form> submit and TreeGrid ASP.NET framework
Source files:

FrameworkAspStyle.aspx

(this html page and also server script that generates and processes XML data),

DBDef.xml

(static XML layout),

../Database.db

(source SQL database, table TableData)

../Framework/TreeGridFramework.aspx

(TreeGrid ASP.NET framework support script, included into Framework.aspx script)
This example uses

SQLite

../Database.db file as source SQL database. You can switch to

MS Access

MDB database by uncomment the line "Data Source=..." in FrameworkAspStyle.aspx.
The MDB database can be used only in 32bit mode of IIS. Also the ASP.NET service program must have write access to the Database.mdb file.
To permit 32bit application on 64bit IIS, go to IIS manager, display application pools list (usually in root under computer name). Choose DefaultAppPool (or the pool you use for the ASP.NET applications the TreeGrid examples are run on), select Advanced configuration and set Permit 32bit application to true.
<% ' ------------------------------------------------------------------------------------------------------------------------------- Dim bits As String = "32" : If IntPtr.Size <> 4 Then bits = "64" ' Only for SQLite Dim SQLiteDLL As String = GetPath() + "\\..\\..\\..\\Server\\SQLite" + bits + "\\System.Data.SQLite.DLL" ' Only for SQLite Dim Source As String 'Source = "Data Source=""" + GetPath() + "\\..\\Database.mdb"";Provider=""Microsoft.Jet.OLEDB.4.0"";Mode=Share Deny None;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Engine Type=5;Jet OLEDB:System database=;Jet OLEDB:SFP=False;persist security info=False;Extended Properties=;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1" ' MS Access MDB database Source = "Data Source=" + GetPath() + "\\..\\Database.db" ' SQLite database Dim Grid As TreeGrid = New TreeGrid(Source, "SELECT * FROM TableData", "ID", "", "", "", SQLiteDLL) '1 - Connection string '2 - SQL Selection command to select all rows from database, used also for saving data back '3 - Column name in database table where are stored unique row ids '4 - Prefix added in front of id, used if ids are number type '5 - Column name in database table where are stored parent row ids, if is empty, the grid does not contain tree '6 - Column name in database table where are stored Def parameters (predefined values in Layout, used usually in tree _ Dim XML As String : XML = Request("TGData") If XML <> "" And XML <> Nothing Then Grid.SaveXMLToDB(XML) ' Saves data to database XML = Grid.LoadXMLFromDB().Replace("'", "'").Replace("&", "&") ' Loads data from database ' ------------------------------------------------------------------------------------------------------------------------------- %>