RAD Studio 2007 - Page Counter Example
ASP.NET 2.0 application with AJAX and InterBase/Blackfish - Example
Now with
RAD Studio 2007 and ASP.NET 2.0 we have a lot of cool features for .NET
Web Development and them I move this example to ASP.NET 2.0 and migrate from BDP
to ADODbxClient.
This new version of Page Counter explores some of these news features in RAD Studio
2007, like:
- Ajax Web-based Application
- ADODbxClient
- Master Page
- Site Maps
- Themes
- Blackfish SQL
Also explains the 8 events in the global.asax file. These events are used to create application access, page access and logged users counters.
- Application_Start
- Session_Start
- Application_BeginRequest
- Application_EndRequest
- Application_AuthenticateRequest
- Application_Error
- Session_End
- Application_End
This application was tested with two databases, InterBase 2007 and
Blackfish SQL, so I'm using ADODbxClient that you can created the same database
structure in other databases.
Database Setup Information: the first time you run
This application uses an InterBase database (pictures.ib), whose
creation and population scripts are located in the "database"
subdirectory. The first time you open the application the database may
not be set up correctly, and the data will not appear at design time. So it
is necessary to correctly set up the BdpConnection control to access the .ib
used by the application.
The database connection is based on dbExpress, the
parameteres in Web.Config define what database to use.
The parameter DatabaseAlias define the database connection,
you can connect in InterBase or Blackdish SQL:
For InterBase use the alias PageCounterInterBase
For BlackfishSQL use the alias PageCounterBlackfish
Web.config and dbxconnections.ini parameters information:
Before you run this application, please check the following
web.config and dbxconnections.ini parameters for InterBase or/and Blackfish SQL:
- TraceTimeRequest (on / off ) (Web.config) - > if "on", displays load
time at the bottom of the page.
- Database Alias (Web.config)
- For InterBase use the alias PageCounterInterBase.
- For BlackfishSQL use the alias PageCounterBlackfish
- Database and Host (dbxconnections.ini)
- Database --> Database parameter define the
database path. For Blackfish the Host server use the parameter Host.
- User_name and Password --User_name and password parameters define the
user and password to access the database.
- Database example for InterBase
- This application uses pictures.ib database in the database sub directory
- Database example for Blackfish SQL
- This application uses Pictures.jds database in the database sub directory
Running the Demos
- Start the IDE.
- Open the project. Complete the steps from the Setup
Information section above.
- Compile the Applicaton (Project Menu, Compile all
projects).
- Run the application with debugging (F9) or without
debugging (Shift+Ctrl+F9)