<%@ Page language="c#"%>
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.
<% // ------------------------------------------------------------------------------------------------------------------------------- TreeGrid Grid = new TreeGrid( //"Data Source=\"" + GetPath() + "\\..\\Database.mdb\";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;Provider=\"Microsoft.Jet.OLEDB.4.0\";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", "Data Source=" + GetPath() + "\\..\\Database.db", // SQLite database "SELECT * FROM TableData", // SQL Selection command to select all rows from database, used also for saving data back "ID", //Column name in database table where are stored unique row ids "", //Prefix added in front of id, used if ids are number type "", //Column name in database table where are stored parent row ids, if is empty, the grid does not contain tree "", //Column name in database table where are stored Def parameters (predefined values in Layout, used usually in tree GetPath() + "\\..\\..\\..\\Server\\SQLite" + (IntPtr.Size == 4 ? "32" : "64") + "\\System.Data.SQLite.DLL"); // Path to SQLite.DLL, for MDB can be null string XML = Request["TGData"]; if (XML != "" && XML != null) Grid.SaveXMLToDB(XML); // Saves data to database XML = Grid.LoadXMLFromDB().Replace("'", "'").Replace("&", "&"); // Loads data from database // ------------------------------------------------------------------------------------------------------------------------------- %>