Iron Speed Designer Application Developers Guide
Iron Speed Designer Application Developers Guide
Iron Speed Designer Application Developers Guide
NOTICES
Copyright 2002-2004, Iron Speed, Inc. All Rights Reserved.
Portions copyright 2002-2003 The Genghis Group (<http://www.genghisgroup.com/>).
nDoc and VBDoc Copyright 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330,
Boston, MA 02111-1307
USA
nDoc and VBDoc components distributed under the GNU General Public License, Version 2, June 1991. Iron Speed
is happy to provide any licensed user of Iron Speed Designer with a complete source code version of NDoc and
VBDoc at no charge as required by the GNU General Public License.
No part of this book may be reproduced, stored in a retrieval system, or transmitted by any means, electronic,
mechanical, photocopying, recording, or otherwise, without written permission from the offer.
Iron Speed, Inc.
1953 Landings Drive
Mountain View, California
94043
(650) 215.2200
www.ironspeed.com
ISBN 0-9752697-2-0
z Page 2
CONTENTS
NOTICES ....................................................................................................................... 2
CONTENTS .................................................................................................................... 3
PART I: GETTING STARTED .......................................................................................... 17
z Page 3
z Page 4
Linking Generated Add, Edit, Show Record, and Show Table Layout Pages ..................................................136
z Page 5
z Page 6
z Page 7
z Page 8
z Page 9
z Page 10
Optimistic Concurrency................................................................................................................................413
Concurrency Handling in Generated Applications.......................................................................................414
Cursor Management .........................................................................................................................................414
Sorting Collation Sequences.............................................................................................................................416
Full-Text Search................................................................................................................................................417
ADO DataSets...................................................................................................................................................417
.NET Data Application Blocks ...........................................................................................................................417
z Page 11
z Page 12
z Page 13
z Page 14
Removing ** Please Select ** from Radio Button List (or Dropdown List) ..................................................643
Adding and Displaying Data..............................................................................................................................646
Adding Multiple Records at One Time .........................................................................................................646
Using XML-Encoded Record Identifiers Passed via URL............................................................................650
z Page 15
z Page 16
17
z Page 18
The generated code includes complex features like multi-table joins, user interface functionality like search and
navigation, and end-user access control. Iron Speed Designer generates native .NET code, with ASPX pages, ASCX
controls, SQL statements and Visual Basic. Developers enjoy unrestricted access to 100% of the generated code, and
modifications to the generated code are automatically preserved when an application is re-generated. There are no
run time license fees or special server software requirements for applications built with Iron Speed Designer.
z Page 19
Iron Speed Designer generates a three-tier architecture for your application, including:
Presentation Layer: ASPX pages and corresponding ASCX controls. The generated web pages are extremely
flexible and may contain any elements of your choosing, including HTML, DHTML, and client-side scripting languages.
Iron Speed Designer passes most of this through when generating the ASPX pages, generating code only for those
components provided by Iron Speed Designer.
Based on your design, Iron Speed Designer generates your applications user interface, including the web pages,
dialog pages, menus, and search and navigation components. Iron Speed Designer generates complex display
components including paginated tables with data from multiple database tables. The user interface can be further
customized using any HTML editor, including Microsoft Visual Studio.
Iron Speed Designer can generate tabular reports comprising data joined from multiple database tables. Active
reports allow you to designate filtering and sorting options that the reports end-users can select, providing additional
reporting flexibility.
Application Layer: Application logic, data access code, data validation code, and code-behinds. Adding your own
application logic to applications generated by Iron Speed Designer is easy. Iron Speed Designer builds applications
that are specifically designed to support code modifications, and your application can be built repeatedly without reintegrating your code extensions.
Iron Speed Designer generates all of the user interface code necessary to support your applications web-based user
interface, including data validation logic for built-in field types, table sorting logic, table filtering logic, and table
z Page 20
pagination code. An extensive set of intelligent field types is supported, providing built-in validation for data types like
email addresses, URLs, currency, and phone numbers.
Database Layer: SQL statements and queries needed for storing, retrieving, and filtering data from the database.
Iron Speed Designer will even generate complex queries including multi-table joins with one-to-many and many-tomany relationships. Most of the generated SQL is packaged as a set of database stored procedures in order to
provide the best execution performance with the fewest round trips to the database.
Iron Speed Designer automatically constructs the SQL queries required for each form, web page, table, and report.
Iron Speed Designer also generates the database access logic that executes the SQL queries, including all data
storage management.
The Microsoft .NET Platform
Iron Speed Designer generates web-based applications that run on the Microsoft .NET platform, making your
applications easier to integrate, deploy, and manage. You will dramatically reduce your development time, freeing you
to focus on customization and integration.
z Page 21
z Page 22
Use the Application Builder to create new applications from your existing database tables and views.
The Application Explorer tab
z Page 23
The Iron Speed Designer Application tag has two primary work areas: a tree on the left for selecting specific
web pages, database tables, and source code files; and an editing area on the right.
Iron Speed Designer has several primary file groupings, identified by the top-level nodes in the tree on the left. At all
times, you will be working within one of these three primary work areas.
The Application Files group lists the source code files generated by Iron Speed Designer and displays the source
code files generated for each application.
The Database group shows the database tables, views and named queries available to your application for each
selected database.
z Page 24
The Generated Documentation group lists the documentation files generated by Iron Speed Designer.
z Page 25
z Page 26
2. Creating web pages containing your selected database tables (see Creating Web Pages with the Application
Builder for details). The Application Builder can create a variety of template-based web pages for your
application, including Show Table, Add Record, Edit Record, and Show Record pages.
3. Constructing menus and other navigation for your application.
4. Creating a virtual directory for your application. Creating a new application also establishes a virtual directory
for your application with the Microsoft IIS web server. This points the Microsoft IIS web server at your
application so that it can serve up the associated web pages and run your application.
5. Generating your application.
The process of creating a new application in Iron Speed Designer establishes the directory structure for two different
aspects of your application:
1. The source file application folder. This is the primary directory, and associated subdirectories, where the input
files for your application are stored. These input files the source code used by Iron Speed Designer to
generate your application -- consist of your HTML layout pages (web pages), component property settings,
and table property settings.
2. The generated application folder. This is the primary directory, and associated subdirectories, where the
generated application files are created and stored by Iron Speed Designer. Generated application files include
the presentation layer ASPX and ASCX files, the application layer Visual Basic code-behinds and generated
classes, and the database layer stored procedures and SQL statements.
This chapter includes information about:
z Page 27
z Page 28
You can select which columns are displayed in the table as well
as their display order in the table and how the data is sorted.
Additionally, you can include search and hierarchical drill-down
controls to the table.
Show Record pages. The Show
Record page displays the contents of
an individual database record in a fieldvalue format. The fields on this page
are not editable by application users.
These pages can be configured as to
which table fields are displayed and
how they are ordered on the page.
z Page 29
Foreign key fields export two data columns, one for the foreign key value (an ID) and a second for the display
as value.
The column order in the exported file is the same as the column order in the database table schema.
z Page 30
Description
Application Name
The name of your application is used for identification purposes and as a prefix in
certain parts of your application, including:
A tag prefix (i.e. namespace) for server controls tags in the generated ASPX
and ASCX files.
ASP
IronSpeed
then the prefix will be changed to App<NAME>. This prevents a name collision with
ASP and IronSpeed presentation-level control tags.
Names must start with a letter and can contain letters and numbers (alphanumeric
strings).
z Page 31
Field
Description
Application
Namespace
The name space is used when generating the application layer code. It generally is the
same as the Application Name, though there is no requirement that this be the case.
Name space restrictions:
The name space should not contain non-ASCII characters, such as European or Asian
characters.
Application
Directory
The folder location where you wish to place your applications files.
Please note: it is possible to accidentally overwrite the virtual directories used by
Microsoft IIS, so use caution when selecting a folder name.
IISAdmin
IISHelp
IISSamples
Formatting
The culture encoding for your application. The culture encoding attributes in your
Web.config file determine many aspects of your generated .NET application, including
currency, date, and number format. Your application uses these settings at run-time to
determine proper operation.
The culture encoding also determines which text string resource file is used when
generating your application, and is used when localizing your application.
Messages
The Messages value determines how the resources are loaded for an application and
is used for culture-specific lookup of resource data. The only purpose of the Message
value is to indicate the language the resources should load, that is, determine which
language the UI strings should use. The Formatting value determines everything else
date formatting, number formatting, and so on.
The text strings themselves are located in a resource file created by Iron Speed
Designer for your application. Complete details on how to modify the resource text
strings is in Error and Validation Message Strings section of the Localizing
(Internationalizing Your Application chapter elsewhere in this Guide.
z Page 32
Select a page style for your web pages from a set of attractive design themes.
Select the page style for your automatically created web pages. Iron Speed Designer provides a variety of attractive
styles from which to choose. Optionally, you can add your own page styles to the gallery. (Details about this are
elsewhere in this manual.)
Field
Description
The page layout style for your initially created web pages.
z Page 33
Iron Speed Designer to retrieve the database schema to help you create user interface pages containing
database information. No changes to the database are made during this retrieval process.
Iron Speed Designer to create a set of stored procedures when generating the application. (Enterprise Edition
only.)
Field
Description
The name of the database server machine. (Note: this is not the name of
the database.) The database server machine name can be:
z Page 34
Field
Description
Use Windows
Authentication
Iron Speed Designer will use your Microsoft Windows name and password
in order to log into your database server. This generally works only for
database servers local to the machine on which Iron Speed Designer is
installed.
Iron Speed Designer uses the user name and password you provide to log
in to your database server. This is generally preferred when connecting to a
database server that is not attached to the machine on which Iron Speed
Designer is installed.
The login user name required to access the selected database server
machine.
Database password
z Page 35
z Page 36
Field
Description
Databases
The databases containing the tables you wish to use in your application. Dont worry if
youre not exactly sure which databases and tables you want; you can add and change
them later.
Available Tables /
Views
The database tables and database views you wish to include in your application.
Selected Tables /
Views
The database tables and database views you have selected to use in your application.
Show system
databases
Selecting this option displays all of the Microsoft SQL Server system databases in
addition to the normal databases.
Most special characters are not supported. Only the space and underscore are supported.
z Page 37
For Microsoft SQL Server databases, table field names may contain:
The at sign (@) sign, dollar sign ($), number sign (#), or underscore (_).
A Transact-SQL reserved word. Microsoft SQL Server reserves both the uppercase and lowercase versions
of reserved words.
Note: Iron Speed Designer replaces spaces and dash characters with underscores.
Deselecting a Table
Deselecting, or unlinking, a table from your application removes your ability to use data from that table in any of the
components generated by Iron Speed Designer. Deselecting a table removes its property settings in Iron Speed
Designer as well as any affected component properties that reference the table.
Deselecting a table does not modify your underlying database; it does not delete the database table schema from your
database nor does it delete any data from your database.
Deselecting a table will not change your application (generated source code) until you next build your application. The
application building process looks for tables marked as unlinked and deletes the table access layer for the table.
User interface pages are built based on the updated settings. If you deselect a table and you subsequently change
you mind, you can select the table again. However, the updates made to the table property settings and component
properties will not be recovered.
When you deselect a table, the following happens immediately:
1. The table property information is deleted.
2. References to the deselected tables are removed from named queries.
3. The component property information is deleted.
4. The table is marked as unlinked for the subsequent application build process.
When application building begins:
1. All databases marked for disconnection are removed from your applications Web.config file.
z Page 38
2. All of the related stored procedures are removed from the database.
3. The related generated record class code file is deleted.
4. The related generated table access class code file is deleted.
5. The related safe class code file is renamed but not deleted.
Disconnecting a Database
Disconnecting a database marks the database for disconnection in Iron Speed Designer. The actual disconnection is
not performed until you next build your application. Disconnecting a database also automatically marks all of the
databases tables for unlinking.
Linked Databases
Microsoft SQL Server allows you to "link" to various other databases including Microsoft Access, Microsoft Excel, IBM
DB2, Oracle, and other ODBC databases. This is done using the "sp_addlinkedserver" command. Iron Speed
Designer does not currently support linked databases because they are not visible to the OLEDB schema query
functions used by Iron Speed Designer to extract table schema information from Microsoft SQL Server databases.
z Page 39
Configure your web pages to include a variety of database fields, filters, search controls and
pagination components.
Select the specific pages you would like to automatically create. The set of pages you choose will be created for the
selected database tables, database views, and named queries.
You can configure the filters, search controls, table columns and other aspects of the individual pages by
selecting the Fields, Filtering, and Totals tabs.
Some record pages permit child tables to be included on the page. Add and configure these child tables by
selecting the Child Tables tab.
z Page 40
Configuring Fields
Option
Description
Order
The display order in which the fields are displayed, either in a table or in a vertical column,
depending on the page type.
Display Name
For Show Table and Edit Table pages, the column heading in the table. For Add Record,
Edit Record, and Show Record pages, the field label.
Display As
This configuration option is available for foreign key fields (both virtual foreign keys and
explicit foreign keys) and allows you to display a field value from the table referenced by the
foreign key rather than the foreign key value (ID value).
Show Field
This option displays the field. If not selected, the field will not be included in the respective
table or field.
Show Label
This option displays the field label. If not selected, the field label will not be included in the
respective table or field.
Justification
Editable
Indicates whether an application user can edit (change) the field. If selected, an application
user can change or provide a new value for the field when using the Add Record or Edit
Record pages.
Required
Indicates that the field is required. If selected, an application user must provide a value for
the field when using the Add Record or Edit Record pages.
z Page 41
Configuring Filtering
Option
Description
Sortable
This option, available for Show Table and Edit Table pages, enables or disables column
sorting for the designated column.
Categorize
Searchable
This option, if enabled, places a search control on the page and indicates which database
table fields participate in the search.
Filter
z Page 42
Option
Description
Page Total
This option, if selected, displays a column total for the table. Only the data displayed on the
current page is totaled.
Grand Total
This option, if selected, displays a column total for the table. All of the data in the table
(database cursor) is totaled, not just the data displayed on the current page.
Once you have selected which automatically created pages to include in your application, you can quickly and easily
configure certain pages to be master-detail pages (also called parent-child or one-to-many pages).
z Page 43
Master-detail record-to-table relationships may be added to any Add Record, Edit Record, and Show Record page that
have a foreign key relationship with another database table, database view or query. Iron Speed Designer uses these
foreign key relationships to determine which tables can be included.
Master-detail pages typically express a parent-child relationship between a parent record and its itemized detail in the
child table. For example, an Order record (the parent) may have multiple line items in the order in a separate Order
Details table (the child). Showing the line item detail on the same page as the parent record is a common need in
many applications.
This page shows an example of a child table displaying the details relating to the parent record.
Option
Description
Include
This option, if selected, displays a column total for the table. Only the data displayed on the
current page is totaled.
z Page 44
Quickly add and configure navigation menu items for your application.
Field
Description
Menu Name
URL
The page file displayed when the menu item is selected (clicked).
z Page 45
z Page 46
Deletes any removed web pages. Any removed (deselected) pages are removed from your applications
project folder.
Creates new web pages. Any newly selected or recently configured pages are created and placed in your
applications project folder.
Generates your applications source code. Your applications ASPX pages, Visual Basic code, and SQL
statements are generated.
Creates a virtual directory for your application. This instructs the Microsoft IIS web server to treat your files as
an application and shows it where your application resides.
If a virtual directory was not created for your application, Iron Speed Designer will inform you. You will need to create
a virtual directory for your application manually using Microsoft IIS before running your application by following the
procedure outlined in the Creating a Virtual Directory for Your Application chapter elsewhere in this Guide. However,
you will be able to continue building your application in Iron Speed Designer.
z Page 47
User interface web pages consisting of ASPX pages with ASCX controls.
User interface display and data validation code, comprising a set of Visual Basic classes.
The ASPX pages and ASCX controls are compiled dynamically by the Microsoft IIS web server when the individual
pages are first accessed (first time only). For Visual Basic code, Iron Speed Designer invokes the Visual Basic
compiler as part of the application building process, essentially doing this in the background for you.
Building an Application
z Page 48
Building an Application
Command: Build, Build
Command: Build, Build All
Applications can be generated at any time, providing a high degree of control over the generation. Only those portions
of your application that have been modified are built.
Generating an application
1.
Select Build, Build or Build, Build All. The user interface pages, database schema, database access code, and
application code are generated for the entire application.
2.
Click the Run button. Your new application is launched in a separate browser.
Alternatively, from the Application Files folder in the Application Explorer, you may click the Run button to run a
specific page.
4.
Option
Description
Build
This command builds only those aspects of your application that require building,
such as web pages, application layer code, and SQL. Generally, only those
portions of your application affected by changes made since your application was
z Page 49
Option
Description
last built will be built.
Rebuild All
The Build All and Run command forces the regeneration of all an applications web
pages and associated code files.
The Build command typically regenerates only the specific pages or components
that have been changed. It functions much like a Make tool. Effectively, Build
All and Run is a "make all" option. Iron Speed Designer determines which files
are changed and which files have not been changed based on the date/time stamp
of the files, exactly like a Make tool. Use Build All and Run in cases you would like
to do a fresh build of the entire system.
In general, you should only need to use this option in one of these situations:
Note that the "safe" Visual Basic classes will never be overwritten, even when you
"Build All and Run".
Run Application
z Page 50
YourWebServerName is the name of the web server where you installed your application (and possibly Iron
Speed Designer)
<Application Folder> is the name you assigned to your application when you initially created it.
An example is: http://www.acme.com/OMS. www.acme.com is the server where your application is running. OMS is
the Application Name for the Order Management System, an example application program.
As a convenience, you can also launch your application by clicking the Run button in the Iron Speed Designer
navigation bar.
In order to run your application, you must deploy it on a Microsoft .NET server. In most cases, your development
environment includes a Microsoft .NET server, so theres very little extra required to run your application.
z Page 51
52
z Page 53
z Page 54
Page
Function
Start page
This page redirects the application user to your application. This file can be modified to
send an application user to a specific page within the application.
The initial default page is Default.aspx, which does not do any processing or redirecting
and is not intended to be seen by the end user in this form. You can modify the
Default.aspx file directly, or you can change the default page URL to make another page
the default page.
Error page
Forbidden page
The forbidden page is displayed when an application user tries to access a page they
are not authorized to view because they do not have the correct access privileges. If the
user types in the URL directly after signing in, the user will be redirected to
Forbidden_Page.aspx if they are not allowed to access the page.
Sign in page
z Page 55
z Page 56
Set database table-related settings in the Databases folder. These settings are applied to all web
pages that use the particular table fields. These settings can be further customized at the page and
component level on each web page.
Moreover, Iron Speed Designer applications include code that translates between the database storage format for a
field, to the display and input formats, and then back again upon insertion to the database. For example, a phone
number may be stored as 6502152200, but displayed as (650) 215-2200. Using Iron Speed Designer, you can avoid
writing such code.
Basic schema information
Iron Speed Designer is not a data modeling tool; it cannot create or modify database tables (schema definitions) nor
will it graphically depict relationships between the various tables. However, it does show the database tables you have
elected to use in your application as well as basic schema information for each table.
The following database table schema information is shown:
z Page 57
Option
Description
Index
Primary key
Indicates whether the field can have only unique values. If selected, only one
row in the table can have any particular value. This is useful for enforcing
uniqueness of numbers, such as record numbers.
Not NULL
Indicates whether the field has a Not Null constraint asserted on it. Such fields
must always be assigned a value when a record is added or updated.
Computed in Database
Description
Include table in
application
Indicates whether the supporting database access code should be generated for
the table. Database tables and views used by the application automatically have
this option selected. However, you may instruct Iron Speed Designer to include
code for tables not directly used by the applications web pages. This is useful in
circumstances where a non-web interface is being used, such as a web service
or a Windows application.
z Page 58
Description
Display name
The default field name used on the web pages referencing the table. The display
name can be further customized on a component-by-component basis by setting the
components Properties.
Validation type
The Validation Type value specifies the display formatting and data validation used
whenever the field is displayed or used as an input field.
The Validation Type values are described below in the Field Validation Types section.
The length, in characters, of the fields display width. Note that this setting governs
only the display width of the field, not the number of bytes that the underlying database
field can accommodate. Text box columns pertains primarily to string-based field
types.
z Page 59
For example, the database might specify an email address field as a "varchar" field. In Iron Speed Designer, you can
designate this field as "varchar", or better yet, as Email Address one of the built-in advanced field validation types.
If you designate the field as Email Address type, then the generated code is even more strongly typed as an email
address, thus ensuring the generated code and any extensions you write comply with the strong typing.
The database field types are described in the following table.
Iron Speed Designer supports a wide
variety of field validation types.
Field
Description
Boolean
Country
Currency
At present, the US Dollar is the only supported currency. Currency amounts are
displayed with a leading $ symbol.
z Page 60
Field
Description
Date
Decimal Number
Email Address
File
Image
Image is a file name in standard Windows format. The image field may contain:
An image file name that is resident in the file library directory on the
same server (e.g., toshiba123.gif). File names can be relative, e.g.,
...\Graphics\Image.jpg.
Number
(integer number)
Password
Displays text as a set of asterisks. When shown as an editable text box, the
actual value is displayed (due to a limitation in the underlying Microsoft .NET
control). When shown as an editable dropdown or a read only label, a set of
asterisks ("*****") is displayed.
Note: Password columns are not sortable in tables.
Percentage
String
The US Phone Number follows a format with an area code and a seven-digit
phone number, e.g., (650) 215-2200.
z Page 61
Field
Description
U.S. State
ZIP codes can be 5 digits or 9 digits. 9 digit ZIP codes are hyphenated.
URL
Very Large String fields can contain any alphanumeric character. These fields
are generally used for CLOBs (character large objects).
The following primary key and foreign key options are available.
Option
Description
If the field references another table, the Display Foreign Key As field specifies which
field in the table should be displayed.
<Display column value>. If this is selected, then the field value is displayed rather
than any particular field from the joined table.
z Page 62
Option
Description
Specifies the database table joined by this field. The list contains the names of all the
primary keys in all other tables within the same database in the form
<TABLE>.<FIELD>. Composite foreign keys display multiple fields (rows) with foreign
key references back to the corresponding key fields in the primary table.
For additional information, see: Adding Virtual Foreign Key Relationships.
Specifies whether the field is a primary key for the table. Zero or more fields may be
selected which collectively comprise the primary key of the table (a composite key).
For additional information, see: Adding Virtual Primary Key Relationships.
The table's, view's, and named querys records can be retrieved by ID, which:
Allow Add Record, Edit Record, and Show Record pages to be created for the table, view, and named
query.
Images in such tables to be displayed, since binary database images can only be displayed for tables with
primary keys. This overcomes a limitation resulting from technical issues involving HTML/HTTP capabilities.
Improving the accuracy of the table's default keys (implicit IDs) and decrease the size of each record's default
key for many tables, views, and named queries. This improves the runtime performance of Show Table pages
and decreases the size of the ViewState for such pages.
Note: Virtual primary keys cannot be added to physical tables that already have a physical primary key. Tables
cannot have multiple primary keys, either physical or virtual.
z Page 63
Iron Speed Designer does not differentiate between Virtual and explicit (real) foreign keys when it creates the
underlying database access logic and SQL query statements. For example, virtual foreign keys are usable for one-toone and one-to-many relationships and allow editing of multiple related records from either a single or multiple tables.
The only differences between these two foreign keys types are those resulting from the databases use and
enforcement of real foreign keys that are explicitly declared in the database. This implies:
z Page 64
Since your application relies on the database to enforce the uniqueness of foreign keys, virtual foreign keys do
not have uniqueness enforced.
Since your application relies on the database to prevent deletion of parent records that still have children,
virtual foreign key values do not necessarily reference a valid, existing parent.
There may be other differences/implications that might affect schema modification, data migration, etc.
You can only create a virtual foreign key to a database table from the same database. This mimics the behavior of
Microsoft SQL Server foreign keys defined within the database. In Microsoft SQL Server, you cannot make a foreign
key to a table in another database, and it is also the case in Iron Speed Designer.
Creating Virtual Foreign Keys
Location: Application Explorer, Databases folder, Edit, Create Virtual Foreign Key
z Page 65
Field
Action
Table name
Field name
Description
Default Value
The default value, if any, with which to populate the record when it is initially displayed and
added to the database. Default values may be any text string.
Display Format
Optional. Specifies the fields display format, typically for numbers and dates.
The Display Format options are described below in the Display Format Options section.
z Page 66
Option
Description
Storage Format
Optional. Specifies the fields storage format, typically for numbers and dates.
The Storage Format options are described below in the Storage Format Options section.
Trim Spaces
Case Conversion
Constraint
No
Leading and trailing spaces are not removed from the string. The string is
unaltered.
Optional. Specifies a special processing function to be performed on data entered into the
field when new records are created or existing records are updated.
None
All Lowercase
All Uppercase
Specifies any special database constraints (SQL) that will be executed at the time the record
is inserted into the database.
For more information, see:
Formatting Options
Boolean
You can set the display format to be any string values representing True and
False. The syntax for format strings is:
z Page 67
Field Type
Formatting Options
<True Value>,<False Value>
Some examples are:
Yes,No
(this is the default)
Y,N
True,False
T,F
1,0
Positive,Negative
If you use a Checkbox display style for a FieldValue code generation tag in
conjunction with the Boolean validation type, you must make sure that the
Checkboxs checked value and unchecked value match the Boolean fields
display format. The checked value and unchecked value of the Checkbox is
set in the Display Style Options area.
The formats for Iron Speed Designers date field types must be valid .NET
format strings. Both standard and custom format strings are permitted, as
long as they are considered valid by .NET, as defined in the Microsoft .NET
format string documentation below.
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cpguide/html/cpconformattingtypes.asp
This information is quite extensive. Several examples are shown below in
Standard Date and Time Format Strings and Custom Date and Time Format
Strings.
Currency
Decimal Number
Number
Percentage
The formats for Iron Speed Designers numeric field types must be valid .NET
format strings. Both standard and custom format strings are permitted, as
long as they are considered valid by .NET, as defined in the Microsoft .NET
format string documentation below.
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cpguide/html/cpconformattingtypes.asp
This information is quite extensive. Several examples are shown below in
Standard Numeric Format Strings and Custom Numeric Format Strings.
z Page 68
Field Type
Formatting Options
US State
Special formatting codes are available for this field type, as explained below
in US State Format Strings.
Option
Examples
Option
Examples
dd/MM/yy
04/10/2001
z Page 69
Option
Examples
Currency. The number is converted to a string that represents a currency amount. The currency
symbol is culture specific, e.g. , , .
Example for value 12345.68 and culture en-US: $12,345.68
The currency symbol displayed depends on the culture encoding in your Web.config file. The table
below shows several examples of currency symbols displayed for the number 208.58.
Culture Encoding
Format
ru-RU
208,58p
en-GB
208.58
en-US
$208.58
Decimal. This format is supported for integral types only. The number is converted to a string of
decimal digits (0 - 9), prefixed by a minus sign if the number is negative.
Example for value 12345: 12345
Option
Examples
#,#
[##-##-##]
00.00
z Page 70
Option
Examples
Formatting Options
Boolean
If the underlying database type is string-based, you can specify how Boolean
values are written to the database. The syntax is the same as Display
Format. This means that you can display values one way, but write them to
the database another way. For example, you could display True as "Yes" but
save it in the database as "T".
If the underlying database type is numeric (i.e. bigint, decimal, etc.), the user
does not have control over the storage format. True/False values are stored
as the numbers 1 and 0.
By default, the Boolean column class recognizes the following set of True and
False values:
True: "True", "T", "Yes", "Y", "1"
False: "False", "F", "No", "N", "0"
The formats for Iron Speed Designers numeric and date field types must be
valid .NET format strings. The syntax is the same as Display Format. Both
standard and custom format strings are permitted, as long as they are
considered valid by .NET, as defined in the Microsoft .NET format string
documentation below.
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cpguide/html/cpconformattingtypes.asp
This information is quite extensive.
z Page 71
Field Type
Formatting Options
US State
Special formatting codes are available for this field type, as explained in the
US State Format Strings section.
Action
Numeric fields:
Currency
Number
Decimal Number
Example:
Constraint: 1, 2, 3, 4
If a constraint is specified, Iron Speed Designer automatically creates a dropdown
menu for this field on the Add Record and Edit Record pages.
String fields:
String
Country
Credit Card Number
Email
File
Password
URL
US Phone Number
US State
US ZIP Code
Boolean
z Page 72
Field Type
Action
Iron Speed Designer automatically creates a dropdown menu for this field on the
Add Record and Edit Record pages with the two values in the Format. If the
Format is not specified, the dropdown menu will show T and F for True and False.
Please note that these values should not be quoted, unlike the Constraint values
above. Please also note that you cannot specify a comma within these values; it
will be interpreted as a separate value.
Date fields:
z Page 73
Create custom SQL queries you can reuse in Iron Speed Designer.
Named queries are available for use throughout Iron Speed Designer, including:
The Application Builder for creating Add Record, Edit Record, Show Record and Show Table pages based on
the named query.
As data sources for several code generation tags, including the FieldValue, Record, and Table tags.
z Page 74
The named queries are defined using a dialog similar to the Add Where Clause dialog in the Properties dialog. (See
Advanced Filter Criteria (Multi-Table Joins) later in this Guide.) The queries are modified in one central place the
Database folder in Iron Speed Designer allowing you to centrally manage and update them.
z Page 75
"EmployeesReportsTo" is an alias for the Employees table and is used to avoid ambiguity. When creating queries
using Iron Speed Designer, you can create aliases such as EmployeeReportsTo using the "New Alias" button. You
can then select this alias in the same way you select a table when specifying join criteria.
Query Name Restrictions
Query names may contain alphanumeric characters, spaces, and underscores. Query names and alias names have
these additional restrictions:
z Page 76
Renaming / Changing
Deleting
Primary key
Table fields
The database is searched for tables that may require refreshing due to changes in the underlying table definitions.
Those tables requiring refreshing are marked in orange in the Databases folder in the Application Explorer.
z Page 77
2.
Select Accept All Changes or Accept Changes for Selected Table. This performs the actual refreshing of the
tables highlighted in the tree. This gives you the opportunity to de-select any tables you do not wish to refresh.
The refreshing process is performed and confirmed. Your application will now incorporate the new database changes
the next time you build your application.
Mapping Fields
If it is likely that a database field was renamed, the Map Field function can be used to identify the old field currently
used by Iron Speed Designer and its renamed counterpart in the database schema. By mapping the old field to the
new one, you can retain previously entered table and page properties.
z Page 78
z Page 79
2. Single-role authentication. Application users must have a designated role in order to access a particular web
page. Individual web pages are configured so that only those users with the designated role can access the
page.
3. Multiple-role authentication. Individual web pages are configured to accept users who have one of several
designated roles. For example,
Simple sign-in authentication
Simple sign-in authentication distinguishes between users who are signed in and those are not. Users who are not
signed in are called anonymous users. Because of the flexibility in Iron Speed Designers role-based security model,
you can grant access to individual pages to either signed in or anonymous users, or to both signed in and anonymous
users. This is very useful when you want your application to present one view of your data to a signed in user and a
different view, perhaps more limited, to users that havent signed in or dont have an account (anonymous users).
Simple sign-in authentication distinguishes between
users who are signed-in and those who are not
(anonymous users).
All that is needed to configure sign-in authentication is a single database table containing your application users basic
user name and password information. Configuring simple sign-in authentication is straightforward:
Step 1: Configure the role-based security by selecting the proper fields from the selected database table.
Simple sign-in security requires just a
single database table with basic user
name and password information.
z Page 80
Each user has one role assigned to them. This role assignment is in the same database table as the user name and
password information required for simple sign-in authentication. Configuring single role authentication is
straightforward:
Step 1: Configure the role-based security by selecting the proper fields from the selected database table (user name,
password, user ID and role).
Single role security requires
just a single database table
with basic user name and
password information.
z Page 81
z Page 82
Separate tables for Users, User Roles, and Roles. You can have a one, two, or three table user roles
configuration.
A variety of data types for these tables so you are not required to change your schema to use role-based
security.
You can quickly and easily secure your web pages so that only those assigned to appropriate access roles can access
these pages. Securing web pages is a four-step process:
1. Create user account information in your database.
2. Create a set of user roles.
3. Identify the location of user information in your database.
z Page 83
z Page 84
Field
Description
User Name
The User Name is the text string entered by an application user on the Sign In page.
This can be any field in your User Table, including a first name, last name, or email
address.
Password
The Password is a text string entered by an application user on the Sign In page. This
can be any field in your User Table. The User Name and Password together uniquely
identify a user account in the User Table and are sufficient to authenticate a user and
sign them in.
User ID
The User ID field is the unique record identifier corresponding to a record in the User
Table for a particular user account.
Any table in your database can be a User Table; there is no restriction on which table may be designated as a User
Table nor what other fields it needs to have other than those listed above.
Field
Type
UserID
Integer
FirstName
String
LastName
String
UserName
String
Password
String
Address
String
Description
User table
The table in your database containing the user name and password information.
z Page 85
Field
Description
User Name
The User Name is the text string entered by an application user on the Sign In page.
This can be any field in your User Table, including a first name, last name, or email
address.
Password
The Password is a text string entered by an application user on the Sign In page. This
can be any field in your User Table. The User Name and Password together uniquely
identify a user account in the User Table and are sufficient to authenticate a user and
sign them in.
User ID
The User ID field is the unique record identifier corresponding to a record in the User
Table for a particular user account.
As a matter of convenience, you may wish to set the Display Foreign Key As property for the Roles Table so that text
descriptions of the roles are displayed in your application rather than the Role ID values.
Role-based security requires users to belong to different roles. Based on the roles assigned to individual users, they
are granted access to specific pages that permit access for those roles. Your database will need a table that identifies
the role(s) assigned to each user.
z Page 86
Description
User ID Field
The User ID Field designates the field in the Roles Table that uniquely identifies
each user.
Role ID Field
The Role ID Field designates the field containing the role assigned to the user.
Type
UserID
Integer
FirstName
String
LastName
String
UserName
String
Password
String
RoleID
String
Address
String
z Page 87
Type
UserID
Integer
RoleID
String
UserID
RoleID
10
Customer
11
11
12
Marketing Manager
Iron Speed Designer generates application code for both of these scenarios based on how you identify the location of
the role information in your database.
Selecting the Roles Table
In the Role-Based Security Wizard, make these selections:
Field
Description
User ID Field
The User ID Field designates the field in the Roles Table that uniquely identifies
each user.
Role ID Field
The Role ID Field designates the field containing the role assigned to the user.
z Page 88
z Page 89
Description
Menu text
The Menu text is used for the Sign In and Sign Out menu items on the
applications navigation menu.
Page name
Page folder
The folder where the newly created sign in or sign out page will be placed.
z Page 90
The roles shown in the Security tab are from the Roles Table you select and configure in the Role-Based Security
Wizard.
Component-Level Security
Iron Speed Designer supports component-level security in addition to page-level security. The following componentlevel objects will be able to be shown or hidden based on the user's role and login status:
GEN:Button
Literal
Label
Image Button
Link Button
Push Button
GEN:HTML
GEN:ImageButton
z Page 91
GEN:Label
GEN:LinkButton
GEN:Literal
GEN:Menu
GEN:PushButton
GEN:Record
GEN:Table
GEN:Use
z Page 92
Click the appropriate navigation menu tab or button to go to the table you designated as
your applications User Table in the Role-Based Security Wizard.
2.
3.
Enter the User Name, Password, Role and other information required.
4.
z Page 93
Applications built with Iron Speed Designer support local date formats, currency symbols and
character sets.
A variety of factors, settings, and parameters contribute to a localized application:
Culture encoding. Your application has a culture coding that indicates to the .NET framework how to handle
basic properties, like data and time formatting, language, etc.
Page encoding. Iron Speed Designer supports UTF-8 Unicode encoding throughout your application.
Date and time formatting. A variety of date and time formats are used worldwide. Applications built with Iron
Speed Designer are built on the .NET framework, so the date and time field displays and input fields take their
cue from the particular culture setting in the Machine.config file or Web.config file.
Number and currency formatting. Some number formats use a decimal point to separate dollars and cents;
other formats use commas.
Error text string translation. The error and information text messages in the Iron Speed base classes should
be translated to the appropriate language for your application.
z Page 94
One important note: Applications created with earlier versions of Iron Speed Designer before V1.5 can be localized,
but only web pages created in V1.5 or later will use the localized strings. This is because the underlying code
generated by V1.5 and later makes use of the text string resource files described later in this chapter.
This section contains information about:
Culture Encoding
Page Encoding
Character Sets
Culture Encoding
The culture encoding attributes in your Web.config file determine many aspects of your .NET application, including
currency, date, and number format. Your application uses these settings at run-time to determine proper operation.
Since these culture encoding attributes are used by the .NET framework, Iron Speed Designer does not use them
directly when generating your application. However, a discussion of them is included here due to their importance in
localizing your application.
The culture encoding attributes are in the configuration section of Web.config, for example:
<configuration>
<system.web>
<globalization
fileEncoding="utf-8"
requestEncoding="utf-8"
responseEncoding="utf-8"
/>
</system.web>
</configuration>
To assist you in localizing your application for multiple cultures, you can instruct Iron Speed Designer to build your
application for a particular culture via the Application Information screen of the Application Builder in Iron Speed
Designer.
z Page 95
The following globalization and culture encoding attribute information is from Microsofts Setting the Culture and UI
Culture for Web Forms Globalization.
Attribute
Description
Culture
uiCulture
fileEncoding
Specifies the default encoding for .aspx, .asmx, and .asax file parsing. Unicode and
UTF-8 files saved with the byte order mark prefix will be automatically recognized
regardless of the value of fileEncoding.
requestEncoding
Specifies the assumed encoding of each incoming request, including posted data and
the query string. If the request comes with a request header containing an AcceptCharset attribute, it overrides the requestEncoding in configuration. The default
encoding is UTF-8, specified in the <globalization> tag included in the Machine.config
file created when the .NET Framework is installed. If request encoding is not specified
in a Machine.config or Web.config file, encoding defaults to the computer's Regional
Options locale setting. In single-server applications, requestEncoding and
responseEncoding should be the same. For the less common case (multiple-server
applications where the default server encodings are different), you can vary the
request and response encoding using local Web.config files.
responseEncoding
Specifies the content encoding of responses. The default encoding is UTF-8, specified
in the <globalization> tag included in the Machine.config file created when the .NET
Framework is installed. If response encoding is not specified in a Machine.config or
z Page 96
Attribute
Description
Web.config file, encoding defaults to the computer's Regional Options locale setting.
In single-server applications, requestEncoding and responseEncoding should be the
same. For the less common case (multiple-server applications where the default
server encodings are different), you can vary the request and response encoding using
local Web.config files.
An example Show Order Table page with set to display certain dates and currencies in
localized formats.
Here are the globalization settings for the Show Order Table page shown above. The Web.config globalization entry is
set to fr-FR which, in turn, causes the Euro currency symbol to be used since the Euro is the official currency in
France. Similarly, the DD/MM/YYYY European date format is used.
<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<globalization
fileEncoding="utf-8"
requestEncoding="utf-8"
responseEncoding="utf-8"
culture="fr-FR"
uiCulture="fr-FR"
/>
z Page 97
Page Encoding
Iron Speed Designer automatically sets the page encoding to UTF-8. (There are several HTML page encodings,
including UTF-8, UT-16, and UTF-32.) In particular, Iron Speed Designer generates ASPX pages and ASCX controls
with a UTF-8 Byte Order Mark (BOM) EF BB BF at the beginning of file. While not strictly required, this is considered
the correct way to do things by many application developers.
For more detail on the UTF-8 page encoding, we recommend:
http://www.ifi.unizh.ch/mml/mduerst/papers/PDF/IUC11-UTF-8.pdf
For more details on UTF-8 and the byte order mark, we recommend:
http://www.opentag.com/xmli18nfaq.htm#enc_bom
Character Sets
You can insert Unicode characters into your applications source files in a variety of ways. Unicode characters may
appear in:
HTML layout page files. Iron Speed Designer passes through any HTML, scripting code and other content in
your HTML layout pages when generating your applications ASPX pages.
Database tables. Your database tables may use any Unicode UTF-8 character set desired. Applications built
with Iron Speed Designer will properly display the characters stored in your data fields.
Properties settings. Properties settings containing Unicode characters entered through the Properties dialog.
Note that at this time we recommend that you use only ASCII characters in:
z Page 98
The table below shows several examples of currency symbols displayed for the number 123456789.76.
Culture Encoding
Format
en-US
$123,456,789.76
es-ES
123.456.789,76
es-UY
$U 123.456.789,76
ru-RU
sr-SP-Latn
123.456.789,76 Din.
sv-SE
123.456.789,76 kr
Iron Speed Designer also supports currency validation in any localized format supported by the .NET framework. This
is accomplished by generating server-side validation, rather than client-side validation, allowing validation to be
tailored to the locale of the web server.
The application layer code files. These files are chiefly Visual Basic files, and typically have gen.vb and
safe.vb suffixes. (See Part IV of this Guide for details.)
You may change these messages to conform to the language and format of your choice. Localizing (translating)
message strings is a straightforward process. They are physically contained in two separate resource files:
z Page 99
ProjectTemplate.<UI CULTURE>resx. These application messages are used by your application for
displaying data validation errors and for other application-level uses. These strings are copied from
ProjectTemplate.resx into your application as part of the application building process. As such, the
ProjectTemplate.resx file is not part of your application, but it is an integral part of producing your application.
BaseClasses.<UI CULTURE>resx. These system messages are primarily used for non-application specific
messages in applications. Examples include bad input data format and concurrency handling messages.
These strings are retrieved from BaseClasses.resx by the application at run-time. Consequently,
BaseClasses.resx is considered part of your application and should be included when you move your
application into production.
ProjectTemplate.resx
ProjectTemplate.resx is normally maintained in your projects source directory since it is not part of the actual
application. You can have multiple ProjectTemplate.resx files, one for each language and culture. The culture
selected in Iron Speed Designer (Application Properties page) determines which ProjectTemplate.resx file is used to
generate and compile your application. Because these strings are compiled into your application, the
ProjectTemplate.resx file is not part of your application. You do not include it when putting your application into
production.
When you create a new application or select a new culture, Iron Speed Designer creates a new ProjectTemplate.resx
file, based upon the English culture version of ProjectTemplate.resx, and places it in:
\<Iron Speed Designer>\Globalization\Resources
The actual file names depend on your applications chosen locales, e.g.:
ProjectTemplate.es-PA.resx
ProjectTemplate.en-US.resx
You can edit the text strings directly in:
\<Iron Speed Designer>\Globalization\Resources\ProjectTemplate.<UI CULTURE>.resx
We recommend using the built-in Visual Studio XML editor. All of the messages are stored in the data section of the
file. (Note: You should never modify the ProjectTemplate.resx file directly, since this file is automatically upgraded by
Iron Speed Designer when installing new versions.)
After you have made the desired modifications, simply build your entire application (Build, Build All) and the strings in
your ProjectTemplate.<UI CULTURE>.resx file will be compiled into your application. Generating your application
replaces the hard-coded validation messages with the text messages in the ProjectTemplate.resx file.
z Page 100
BaseClasses.resx
These system messages are primarily used for non-application specific messages in applications. Examples include
bad input data format and concurrency handling messages. These strings are retrieved from BaseClasses.resx by the
application at run-time. Because BaseClasses.resx is used by your application at run-time, it is part of your application
and should be included with your application when placing it into production.
When you select a new culture, Iron Speed Designer creates a new BaseClasses.resx file, based upon the English
culture version of BaseClasses.resx, and places it in:
\<Iron Speed Designer>\Globalization\Resources
The actual file names depend on your applications chosen locales, e.g.:
BaseClasses.es-PA.resx
BaseClasses.en-US.resx
You can edit the text strings directly in:
\<Iron Speed Designer>\Globalization\Resources\BaseClasses.<Culture>.resx
We recommend using the built-in Visual Studio XML editor. All of the messages are stored in the data section of the
file. (Note: You should never modify BaseClasses.resx directly, since this file is automatically upgraded by Iron Speed
Designer when installing new versions.)
After you have made the desired modifications, simply build your entire application (Build, Build All) and the strings in
your BaseClasses.<UI CULTURE>.resx file will be copied into your applications project folder.
Resource file format
Resource files are straightforward XML files that follow a format defined by Microsoft and used by Iron Speed Designer
and by your applications. An example ProjectTemplate.resx file is shown below.
<!-- Validation Messages -->
<!-- In the following, the parameter {FieldName} is substituted by Designer with database column name -->
<data name="val:ValueIsRequired">
<value>{FieldName} value is required.</value>
</data>
<data name="val:InvalidValue">
<value>The {FieldName} value you entered is invalid. It may be invalid for a number of reasons. You may have
entered a value that is longer than what is allowed, the value may contain invalid characters or the value might be out of
range of allowed values. Please review the value and correct it and submit the changes again.</value>
</data>
z Page 101
<data name="val:ValueTooLong">
<value>Value for {FieldName} is too long</value>
</data>
Each entry in the resource file has a Name and a Value. The Name is the name of the string resource, called a
Resource Key. The value is the localized string to be used in your application.
Some validation messages, such as field value validation messages, are parameterized by name; other messages
are parameterized by number, e.g., {0}, {1}, etc. You can localize (translate) the message text. However, do not
translate or change the parameters, e.g., {FieldName} and {0}, because Iron Speed Designer looks for these
parameters by name when generating your application.
The resource keys have prefixes, "Txt" (for Text), "Val" (for Validation Message), and "Btn" (for Button), called
Resource Key Prefixes. Their primary purpose is to distinguish keys from values when viewing and editing the string
resource files.
Resource
Key Prefix
Use
Btn
Button text.
Err
Error messages.
Txt
Val
Some resource keys, such as dialog titles for the Add Record, Edit Record, and Show Record pages and some
validation messages, are parameterized so that values can be inserted in the string. This is necessary because the
position of the actual table name in such a message varies from language to language, so simple string concatenation
won't fit all cultures. For example, "Add {TableName} Record" will translate into "Add Employees Record" for the Add
Employees page, and "Add Customers Record" for the Add Customers page, etc. Some validator messages use
these parameters, e.g. "{FieldValue} is restricted to 25 characters" where {FieldValue} is a column name.
<data name="Txt:AddDialogTitle">
<value>Add {TableName} Record</value>
</data>
where {TableName} is substituted at application generation time with the table name for which the page is being
created. This parameterization enables the actual table name to appear anywhere in the text, e.g.
<data name="Txt:AddDialogTitle">
<value>editez un recorde de {TableName}</value>
</data>
{TableName} and {FieldValue} are the only named parameters supported at the moment, although others may be
added depending on the needs of the validation messages that are being localized.
z Page 102
Resource Keys are case sensitive. For example, Btn:Edit is acceptable but Btn:edit will not work.
Resource Key Prefixes are case sensitive. For example, Btn:Edit is acceptable but btn:Edit will not work.
Parameter names are case insensitive. For example, {TableName} and { TABLENAME } both will work.
z Page 103
To do this, go to the Microsoft Windows Control Panel -> Regional and Language Options, and then select the
appropriate language, number, currency and date options. After restarting your system, you should be able see your
application in its designated language and format.
The Regional Options control panel dialog in
Microsoft Windows 2000.
U.S. State
At present, these field types only support U.S. formats and cannot be localized to other formats.
z Page 104
z Page 105
Option
Description
Edit Table
Show Table
The specific pre-defined page types that can be automatically created. The
Application Builder will automatically create pages for the selected page types
for any selected database table, database view, or named query.
You can remove any created page within the Application Builder or from the
Application Explorer tab.
Sample filter
Creates several filter controls and a search control for the table component.
Controls are created only for the first few fields.
Filter control
A filter control is created for each field (column) in the table component. The
actual filter control created depends on the database field type.
Search controls
A search control is created for the table. Each field in the table participates in
the search.
Creates table column headings that, when clicked, sort the table based on the
selected columns data.
Categorization control
Option
Description
Add Record
Edit Record
Show Record
The specific pre-defined page types that can be automatically created. The Application
Builder will automatically create pages for the selected page types for any selected database
table, database view, or named query.
You can remove any created page within the Application Builder or from the Application
Explorer tab.
z Page 106
Option
Description
Page Style
The specific page style to use when creating pages. Iron Speed Designer includes
a variety of design themes.
Page location
Existing folder
Option
Description
Compiler
Specifies the compiler with which you wish Iron Speed Designer to compile your
z Page 107
Option
Description
applications.
SQL statement
generation
Visual Basic
(vbc.exe)
Visual Studio
(devenv.exe)
Stored procedures
z Page 108
Layout Tags........................................................................................................................................... 34
HTML Code Generation Tag...............................................................................................................................34
HyperLink Code Generation Tag ........................................................................................................................36
Image Code Generation Tag...............................................................................................................................37
Label Code Generation Tag................................................................................................................................39
Literal Code Generation Tag...............................................................................................................................40
Text Code Generation Tag..................................................................................................................................41
109
Button Tags........................................................................................................................................... 65
ImageButton Code Generation Tag ....................................................................................................................65
LinkButton Code Generation Tag .......................................................................................................................66
PushButton Code Generation Tag......................................................................................................................67
Filter Tags.............................................................................................................................................. 68
CategoryFilter Code Generation Tag..................................................................................................................68
FieldFilter Code Generation Tag.........................................................................................................................70
SearchFilter Code Generation Tag .....................................................................................................................73
Other Tags............................................................................................................................................. 78
Comment Code Generation Tag.........................................................................................................................78
Group Code Generation Tag...............................................................................................................................79
ForEach Code Generation Tag...........................................................................................................................79
Template Code Generation Tag .........................................................................................................................80
Align Code Generation Tag.................................................................................................................................81
z Page 110
z Page 111
z Page 112
1. Create layout pages. Using Iron Speed Designer, you add one or more HTML layout pages to your
applications project. The HTML layout pages define your applications web-based user interface and contain
code generation tags that define which databound controls you want on the various pages. These code
generation tags drive the application generation process.
2. Bind components. Next, you bind the individual databound controls identified by the code generation tags in
the layout pages to the underlying databases by specifying the databases, tables, and fields to be connected
to each individual component. Iron Speed Designer uses this information to generate SQL queries and stored
procedures for the underlying database access logic.
3. Generate code. Finally, with one button click, Iron Speed Designer generates your entire 3-tier application,
including all of the web-based user interface pages, the data validation code, the applications SQL and stored
procedures, and the database access code. The HTML layout pages are converted into ASPX pages and
ASCX controls, and the databound controls are generated as a set of server-side code-behinds and extensible
base classes. Underpinning the databound controls are individual SQL statements and stored procedures.
Each step in this process is more fully described in subsequent chapters.
Layout page files underpin every application built using Iron Speed Designer. This chapter describes what a layout
page file is, how to modify it, and most importantly, how to add layout page files to your application.
This section contains information about:
z Page 113
Linking Generated Add, Edit, Show Record, and Show Table Layout Pages
Its important to note that layout pages are not the final generated web pages. Layout pages are HTML pages; the
final web pages generated by Iron Speed Designer are ASPX pages and ASCX controls and are generated from the
HTML layout pages. Regardless of how the layout pages are created, they may have any layout and design you
choose, and may include any HTML, DHTML, and client-side scripting in your layout pages that you wish passed
through to the ASPX pages generated by Iron Speed Designer.
z Page 114
Iron Speed Designer utilizes a simple set of XML-based code generation tags that let you quickly create your n-tier
web-based applications. Code generation tags specify the database-connected tables, fields, filters, and other
controls you want in your application. Using any text or HTML editor, such as Microsoft Visual Studio, Macromedia
Dreamweaver, or Microsoft Front Page, simply place these code generation tags in your HTML layout pages at the
locations where you wish the controls to appear. From there, these code generation tags instruct Iron Speed Designer
what to generate.
The generated pages and controls do not contain code generation tags they are replaced with .NET controls by Iron
Speed Designer. In this way the code generation tags are simply placeholders where databound controls will be
placed in your pages. If code generation tags are erroneously left in the generated ASPX/ASCX code, they have no
effect and will not provide any data to an application user.
z Page 115
Speed Designer what to generate. The following illustration shows several code generation tags placed at desired
locations within an HTML layout page.
Code generation tags instruct Iron
Speed Designer which components
to generate.
This example shows how complex
pages are constructed in ordinary
HTML with simple declarative code
generation tags positioned where you
wish databound components to be
generated.
Add any number of database-connected components to a web page, including tables, records, fields, and
filters. You can create pages of any sophistication and layout.
Change the look-and-feel of the generated components, including colors, fonts and other stylistic elements.
Create component and page templates that can be applied to any number of pages in your application.
Once code generation tags are placed in a web page, the Iron Speed Designer prompts you for the information
required to connect the controls to the underlying databases and to set other application generation parameters. You
do not need to know SQL or be a programmer to create sophisticated web applications using code generation tags.
z Page 116
When you build your application, Iron Speed Designer replaces the code generation tags with web controls to produce
ready-to-use ASPX pages. The code generation tags are stripped out of the final generated ASPX pages, and
replaced by corresponding web controls, code-behind logic, and transaction management code. This also means that
the code generation tags have no run-time effect on your application because they are not present in the application.
Your application runs completely independent of Iron Speed Designer; there is no residual presence from Iron Speed
Designer left in your application, i.e., no special interpreted languages or 4GLs.
Field Display Tags
Record Tags
Table Tags
FieldLabel
FieldValue
Record
Table
ItemTemplate
AlternatingItemTemplate
Separator Template
HeaderTemplate
FooterTemplate
FieldStatistics
Pagination
TableStatistics
Filter Tags
Layout Tags
Button Tags
CategoryFilter
FieldFilter
SearchFilter
HTML
HyperLink
Image
Label
Literal
Text
ImageButton
LinkButton
PushButton
ForEach
Group
Template
Use
Because code generation tags are simple XML statements, you can use any HTML editor to add code generation tags
to any new or existing HTML layout page. Your HTML editor and web browser will ignore the code generation tags for
display purposes, allowing you to view the pages without seeing the code generation tag.
Code generation tags are very easy to use:
Code generation tags are designed to be used by web designers the graphic artists who design the creative
layout of your web pages without requiring them to become programmers or learn any new language. Code
generation tags are very straightforward, and use standard XML syntax which HTML and your web browser
easily accommodate. A web designer can drop a code generation tag into a web page specifying only the tag
type and name. There are no additional parameters to learn or program.
Code generation tags do not specify database binding. Iron Speed Designer uses the data binding properties
you set in the Properties dialog to generate the page component specified by each code generation tag. Thus,
web designers can focus on layout without worrying about how to connect the components to the database.
You dont have to learn how to program SQL. Unlike many scripting languages, code generation tags arent
SQL queries, so neither the developer nor the web designer need learn the SQL language. Iron Speed
z Page 117
Designer generates all of the SQL queries for you, using the information gathered about each of the code
generation tags, generally from your direct input in Iron Speed Designer.
The specifics of each individual code generation tag are discussed in later chapters in more detail.
Each different code generation tag in Iron Speed Designer has its properties screen because different components
have different binding properties. For example, an Image control (Image code generation tag) is set to the URL, file
name, or database field containing the image to be displayed. In contrast, a Table control (Table code generation tag)
is bound to the underlying database table or multi-table join to be displayed, along with the specific columns to be
displayed, their order, etc.
z Page 118
The process of binding components in your application is perhaps the most time-intensive task you will perform in Iron
Speed Designer because of the rich variations possible. But, it is also one of the biggest time-savers in terms of
overall application development time because with just a few simple parameter settings, you can generate a vast
amount of code.
Component binding is very straightforward. (The Setting Code Generation Tag Propertieschapter later in this Guide
describes the process in detail.)
The Image tag is placed anywhere in your HTML layout page where you wish the image to be displayed. The Image
tag has no other parameters than Name, which distinguishes one Image tag from another.
z Page 119
Two different Name values distinguish one Image tag from the other. This allows Iron Speed Designer to generate
separate components for each tag.
z Page 120
Use the tags Properties dialog to hook up the Image code generation tag to the actual image. This process, called
property setting, is described in the Setting Code Generation Tag Properties chapter in this Guide.
z Page 121
ImageURL="/images/PlaceOrder.gif"
RedirectURL="/Pages/ConfirmOrder.aspx"
ToolTip="Press this button to place your order.">
</BaseClasses:ImageButton>
Some code generation tags specify complex layout and functionality. For example, to edit the value of a field in a
database table, you need only specify GEN:FieldValue tag. Iron Speed Designer automatically replaces this tag with a
text box control and a number of controls that specify the validation that is required for this field. For example, the field
may be a required field in which case, a RequiredFieldValidator is also generated. In this case, the number of
presentation layer control tags generated would be more than one tag to replace one code generation tag.
Code Generation Tag:
<GEN:FieldValue Name=LastName Type=TextBox/>
Code generation tags are also embedded into page template files that define one or more templates for the generation
of an application. The page template files are described elsewhere in this Application Developers Guide.
Optional Properties
Code generation tags that are not bound to valid data sources are ignored when you display the ASPX pages or ASCX
controls. This enables you to iteratively refine your user interface pages without having to worry about specifying
everything in detail. In most cases, a brief message within an HTML comment is generated for each code generation
z Page 122
tag that is not bound. You can view these messages by opening the ASPX/ASPX file in any editor or view them by
selecting View Source from any browser.
Types of Code Generation Tags
The following sections describe the code generation tags supported by Iron Speed Designer. The code generation
tags are divided into these groups:
1. Field Display Tags
2. Record Tags
3. Layout Tags
4. Table Tags
5. Table Component Tags
6. Button Tags
7. Filter Tags
8. Component Use Tags
9. Other Tags
z Page 123
All code generation tag attribute values must be enclosed in double quotes.
The Name attribute is required for most of the code generation tags. The value of the tags Name attribute has
the following restrictions:
o
Code generation tags can be specified in either of two XML formats show below:
<GEN:Button Name=EditCustomer/>
<GEN:Button Name=EditCustomer>Some arbitrary text</GEN:Button>
One of the most common mistakes made by developers not familiar with XML syntax is to use the first format without
the / just before the closing >.
Correct: <GEN:Button Name=EditCustomer/> note: tag ends with />
Incorrect: <GEN:Button Name=EditCustomer> note: missing / before >
The second format is still valid XML if it is followed at some later point by </GEN:Button>. Otherwise it becomes
invalid because the tag is not closed. This is also similar to some HTML tags, such as <TABLE> which must be
closed by </TABLE>.
Code Generation Tag Prefixes
Code generation tags are based on XML. Code generation tags contain a tag prefix to differentiate them from
identically named XML-based tags that may be included in your layout page files.
For example, the <BUTTON> tag in HTML must be differentiated from the BUTTON code generation tag because they
mean two completely different things. To differentiate the code generation tag, we use the code generation tag prefix
and specify this tag as <GEN:Button>. The Tag Prefix is also called the XML Namespace.
The tag prefix immediate follows the < or </ in a tag and ends with :. For code generation tags, the tag prefix is
GEN.
z Page 124
Page
Self
z Page 125
If the FieldValue tag is used by itself, the generated code will incorporate each FieldValue within a presentation layer
control tag for a record. To optimize the application, you can enclose the FieldValue code generation tag within a
Record code generation tag (described later). Enclosing the FieldValue tag within a Record tag is faster because the
FieldValue tags can inherit properties from the Record tags properties.
For more detail, see:
Like the Image tag, the FieldValue tag is placed anywhere in your HTML layout page where you wish the data to be
displayed.
The FieldValue tag is bound to a
database table and field. After
generating the application, the resulting
page looks like this.
You may wonder how the application knew which record to fetch and display. In the example above, each of the
FieldValue tags uses a query string parameter passed in via the pages URL, e.g.:
http://qa-net/Alan1/MyPages/Invoice2.aspx?ID=ALFKI
In this case, Invoice2.aspx is the name of the ASPX page generated by Iron Speed Designer from a layout page
named Invoice2.html. ID is the query string parameter used to identify the primary key of the record being retrieved
from the database. This name, ID, was arbitrarily chosen and there is nothing special about ID. It equally well
could have been Key or any other name. ALFKI is the primary key value that uniquely identifies the record we wish
z Page 126
to display. Again, there is nothing special about this value; it could have been any other primary key value in the
Customer table.
As in the previous example, we use a query string parameter, ID, in the URL to pass the primary key value of the
record we wish to retrieve and display.
FieldValue tags displaying a
customers name and address. ID is a
query string parameter used to pass
the desired records primary key value
into the page.
z Page 127
Using Windows Explorer or similar tools, copy your layout page to your applications Source directory or any
directory underneath Source.
Click View, Refresh. Iron Speed Designer recognizes the newly added layout page. Information about the
layout page appears in the tabs in the right-hand panel.
z Page 128
Select the Layout Source tab to edit a layout page in Iron Speed Designer. Return to the Preview tab after editing the
HTML text to see a preview of the page with your changes.
Iron Speed Designer does give you the ability to quickly edit a layout page. While not nearly as full-featured as most
HTML editors, it is quite convenient for most page editing tasks if you know HTML. Once an edit is complete, you can
click back to the Preview tab to see the result.
Linking Generated Add, Edit, Show Record, and Show Table Layout Pages
You may want to link together several layout pages after generating them with the Application Builder. In particular,
generated Show Table layout pages contain Edit and Show buttons as placeholder links to Edit Record and Show
Record pages you may want to connect. However, these links are not connected and clicking them results in a page
not found error. You can use the Application Builder to generate these Edit Record and Show Record pages, as well
as Add Record pages.
z Page 129
Use the tags Properties dialog to connect these unspecified buttons. (See Setting Code Generation Tag Properties in
this Guide for details.)
z Page 130
Each different code generation tag in Iron Speed Designer has its own Properties dialog because different components
have different parameters. For example, an Image control (Image code generation tag) is set to the URL, file name, or
database field containing the image to be displayed. In contrast, a Table control (Table code generation tag) is bound
to the underlying database table or multi-table join to be displayed, along with the specific columns to be displayed,
their order, etc. You have control over virtually every aspect of that components behavior, and theres very little that
you cant configure within the tags Properties dialog.
The process of setting code generation tag properties in your application is perhaps the most complex task you will
perform in Iron Speed Designer because of the rich variations possible. While theres nothing inherently complex, it
frequently can take a little more time than other tasks in Iron Speed Designer, and it requires a more detailed
z Page 131
understanding of what data your application needs to display and how it should be rendered. But dont worry, property
setting is very straightforward.
Use the Properties dialog to set underlying data sources and display properties for code generation tabs.
The remaining sections in this chapter describe the properties for a variety of the more commonly used components.
For more detail, see:
z Page 132
Display Properties
Options
Description
Page Title
The Page Title is placed into the generated pages HTML <Title> tag.
Component Definition
Options
Description
Type
Button Panel
Footer Panel
Header Panel
Menu Panel
Pagination Panel
RangeFilter Panel
Search Panel
Table Panel
User Control
z Page 133
See Securing Web Pages with Role-Based Security in Part II of this Guide for more detail on establishing user roles.
z Page 134
The FieldValue code generation tag generates presentation layer control tags in the ASPX or ASCX file. The
presentation layer control tags may be different based on the different types of field values displayed (e.g., text versus
image). The primary presentation layer control tag for FieldValue may be followed by some validator control tags (e.g.,
RequiredFieldValidator).
The FieldValue tag can be used either by itself, within a Record tag or within a Table tag. If the FieldValue tag is used
by itself, the generated code will incorporate each FieldValue within a presentation layer control tag for a record. To
optimize the application, you can enclose the FieldValue code generation tag within a Record code generation tag
described later. Enclosing the FieldValue tag within a Record tag is faster because the FieldValue tags can inherit
properties from the Record tags properties.
z Page 135
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot
contain spaces.
Type
No
The Type specifies how the field will be displayed. The type can be changed in
the tags Properties dialog. The supported types are:
CheckBox
DropDownList
FileUpload
HyperLink
Image
Label
Literal
z Page 136
Attribute
Required
Description
RadioButtonList
TextBox
Examples
<GEN:FieldValue Name=FirstName/>
<GEN:FieldValue Name=LastName Type=TextBox/>
<GEN:FieldValue Name=IsMarried Type=CheckBox/>
<GEN:FieldValue Name=EmployeeNumber Type=Hyperlink/>
<GEN:FieldValue Name=EmployeePhoto Type=Image/>
Optimized version:
<GEN:Record Name=EmployeeRecord/>
<GEN:FieldValue Name=FirstName/>
<GEN:FieldValue Name=FirstName Type=TextBox/>
<GEN:FieldValue Name=IsMarried Type=CheckBox/>
<GEN:FieldValue Name=EmployeeNumber Type=Hyperlink/>
<GEN:FieldValue Name=EmployeePhoto Type=Image/>
</GEN:Record>
The FieldLabel tag can also be used to sort a column within a table. If the style is specified in the tags Properties
dialog as a Hyperlink, this tag is turned into a tag that will sort the columns of the table.
z Page 137
Options
Description
Label Text
The text to display. Normally, this defaults to the field name selected. However, you may
override it with a different text string.
You can either specify a text string directly or you can specify a variable of the form
%ISD_DEFAULT%<TABLE NAME>%<FIELD NAME>, e.g.,
%ISD_DEFAULT%Products%ProductName. This variable specifies that the text label is the
default label specified in the Databases folder of the Iron Speed Designer for the
ProductName field in the Products table.
Display style
Hyperlink
The FieldLabel tag will display a clickable link, allowing the associated
table column to be sorted.
Label
Generates a Label presentation layer control tag. The label may include
HTML formatting, including a surrounding <SPAN> HTML tag. The
resulting value is enclosed in a <SPAN> tag. You can also manipulate the
text programmatically in the application layer.
You may also add formatting via pass-through attributes in the tags
Properties dialog.
Literal
Generates a Literal presentation layer control tag without adding any HTML
formatting. The resulting value is not enclosed in a <SPAN> tag. You can
manipulate the text programmatically in the application layer.
z Page 138
Options
Description
You may not add formatting through pass-through attributes in the tags
Properties dialog.
Options
Description
Specifies the database table containing the field whose name is being displayed.
Field
Used In
HTML Layout Pages and Page Templates
Code Generation Tag Attributes
Attribute
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot
contain spaces.
Examples
<GEN:FieldLabel Name=FirstNameLabel/>
<GEN:FieldValue Name=LastNameLabel/>
z Page 139
RECORD TAGS
For more detail, see:
FieldValue tags are often grouped within an enclosing Record tag as shown below. The Record tag groups together
FieldValue tags that fetch and display data from the same physical record. This is the most convenient way to
optimize the generated code because a single SQL query is generated for the Record and associated FieldValue tags.
If there is no enclosing Record tag, each FieldValue will be generated as a separate control with its own SQL query.
You can specify the selection criteria used to select the record in the tags Properties dialog.
<HTML>
<body>
<GEN:Record Name=Customer>
<td><GEN:FieldValue Name="FirstName"/></td>
z Page 140
<td><GEN:FieldValue Name="LastName"/></td>
<td><GEN:FieldValue Name="Address"/></td>
<td><GEN:FieldValue Name="City"/></td>
<td><GEN:FieldValue Name="State"/></td>
<td><GEN:FieldValue Name="ZipCode"/></td>
<td><GEN:FieldValue Name="Country"/></td>
<td><GEN:FieldValue Name="PhoneNumber"/></td>
</GEN:Record>
</body>
</HTML>
You may wonder as to the difference between using FieldValue tags enclosed within a surrounding Record tag and
just using plain FieldValue tags without a surrounding Record tag. There are several benefits to using a surrounding
Record tag:
1. The enclosed FieldValue components will all use the same record. When FieldValue tags are used separately
without an enclosing Record tag, there is no guarantee that each FieldValue will use the same underlying
database record. It is possible for each of them to display data from a different database record, making it
impossible to synchronize the display of related fields. Using an enclosing Record tag solves this problem.
2. Component configuration is simplified. You can set the Record tags data binding properties to the appropriate
database table, saving effort when configuring the enclosed FieldValue tags.
HTML Use Inside Record Tags
There are no restrictions on the HTML included within an enclosing Record tag. HTML and other code generation tags
can be intermingled with the FieldValue tags within an enclosing Record tag, as shown in the following example.
<HTML>
<body>
<GEN:Record Name=Customer>
<B>Bill To:</B><br>
<GEN:FieldValue Name="FirstName"/> <GEN:FieldValue Name="LastName"/><br>
<GEN:FieldValue Name="Address"/><br>
<GEN:FieldValue Name="City"/>, <GEN:FieldValue Name="State"/>
<GEN:FieldValue Name="ZipCode"/><br>
<GEN:FieldValue Name="Country"/><br>
Phone: <GEN:FieldValue Name="PhoneNumber"/><br>
FAX: <GEN:FieldValue Name="FAX"/><br>
</GEN:Record>
</body>
</HTML>
After configuring the components and generating the application, the following page is displayed.
z Page 141
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
The Record tag generates a RecordControl presentation layer control tag. The
presentation layer control tag specifies the selection criteria (query) used to select
the record from the database.
Examples
<GEN:Record Name=OrderRecord>
<GEN:FieldValue Name=OrderNumber/>
<GEN:FieldValue Name=OrderDate>
<GEN:FieldValue Name=CustomerName/>
</GEN:Record>
z Page 142
LAYOUT TAGS
The layout tags allow you to place any free form content on the page. You can specify the content in the tags
Properties dialog.
In most cases, you can specify the content directly in your layout page file. However, there are two cases where it
might be useful to use the layout tags:
1. Developer specified content: In some cases, the content is not known at the time the page templates are
designed. For example, the name of the company in a copyright notice at the bottom of the page may not be
specified in the page template. In this case, the developer can set the content in the tags Properties dialog.
Furthermore, the Iron Speed Designer user does not need to know HTML in order to modify the contents of a
page the specification of the value can be done in the tags Properties dialog.
2. Programming control: Static text placed in the layout page file cannot be accessed or changed
programmatically. To programmatically change the contents of the page or hide some controls, the contents
must be generated as a presentation layer control. For example, to personalize a thank you message to your
most valued customers, you can access the control and change the message and the visibility of the control
programmatically.
For more detail, see:
z Page 143
If new code generation tags are placed in the HTML content, they will not be recognized by Iron Speed Designer.
Similarly, ASPX code placed in the content will not be executed.
The HTML content can contain any valid JavaScript code or any strings enclosed in quotes.
HTML Tag Display Properties
HTML tag display properties.
Options
Description
HTML
The HTML you want to display. The HTML may contain HTML tags, which will be passed
through to the generated page and rendered in the application users browser.
z Page 144
Options
Description
HTML encode
white space
Respects the white space, carriage return and line feed characters in the HTML. White
space is preserved. For example, if you have 10 contiguous spaces, 10 spaces will be
output in the field.
Used In
HTML Layout Pages and Page Templates
Code Generation Tag Attributes
Attribute
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Examples
<GEN:HTML Name=FooterBlock/>
z Page 145
Options
Description
Text
Redirect URL
Target Window
The name of the destination frame or browser, if a new browser is to be launched. The
string can be any string desired. That is, an application can open a window and give it a
specific name; if that name is specified as the Target Window, then the output of the
hyperlink tag will appear in that window.
Used In
HTML Layout Pages and Page Templates
Code Generation Tag Attributes
Attribute
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
The HyperLink tag places a text block that can be clicked by the application user
to go to another web page. Set the text block and URL in the tags Properties
dialog.
Examples
<GEN:HyperLink Name=ClearanceItems/>
Note also:
z Page 146
Use the ImageButton code generation tag if the image needs to have a clickable link.
Use the FieldValue code generation tag with the Type attribute set to Image if an image is being retrieved from
a database table.
Options
Description
Image URLs that are file names are assumed to reside in the same run-time
directory as the page being bound.
Image URLs that are relative will be relative to their page's corresponding runtime directory, not the app's directory.
Example:
Binding an Image tag in the layout page file MyApp\Source\OtherPages\test.html to
"image1.gif" will create an effective reference to MyApp\OtherPages\image1.gif.
Binding this same image to "../Images/image2.gif" will generate an effective reference to
MyApp\Images\image2.gif.
Used In
HTML Layout Pages and Page Templates
z Page 147
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Specify the image file name or URL location of the image in the tags Properties
dialog. The image could be an icon, logo, or any other picture file in the GIF, JPG
or other browser-supported format.
Examples
<GEN:Image Name=Masthead/>
z Page 148
Options
Description
Label Text
The text you want to display. The text may contain HTML tags, which will be passed
through to the generated page and rendered in the application users browser.
HTML encode
white space
Respects the white space, carriage return and line feed characters in the HTML. White
space is preserved. For example, if you have 10 contiguous spaces, 10 spaces will be
output in the field.
Used In
HTML Layout Pages and Page Templates
Code Generation Tag Attributes
Attribute
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Specify the actual label or text in the tags Properties dialog. There is no limitation
to the size of the text specified you are only limited by the memory and
resources on your server.
Examples
<GEN:Label Name=CopyrightMesage/>
z Page 149
Options
Description
Literal
The text you want to display. The text may contain HTML tags, which will be passed
through to the generated page and rendered in the application users browser.
HTML encode
white space
Respects the white space, carriage return and line feed characters in the HTML. White
space is preserved. For example, if you have 10 contiguous spaces, 10 spaces will be
output in the field.
Used In
HTML Layout Pages and Page Templates
Code Generation Tag Attributes
Attribute
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Specify the label or text in the tags Properties dialog. There is no limitation to the
size of the text specified you are only limited by the memory and resources on
your server.
Examples
<GEN:Literal Name=LastName/>
z Page 150
Options
Description
Text
The text you want to display. The text may contain HTML tags, which will be passed through to
the generated page and rendered in the application users browser.
Used In
HTML Layout Pages and Page Templates
z Page 151
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Specify the label or text in the tags Properties dialog. There is no limitation to the
size of the text specified you are only limited by the memory and resources on
your server.
Examples
<GEN:Text Name=GreatDeals/>
z Page 152
TABLE TAGS
For more detail, see:
z Page 153
The Table tag functions much like an enclosing Record tag in that it groups together related tags for display within a
data grid control. FieldValue tags are often used inside of a surrounding Table tag. The Table tag iterates through the
selected data result set, displaying the contents of each successive row in the data grid.
<HTML>
<body>
<GEN:Table Name="Customer">
<table> <!-- HTML table tag -->
<tr>
<td colspan=100>
<B>Our Best Customers</B>
</td>
</tr>
<GEN:ItemTemplate>
<tr> <!-- Row in a table -->
<td><GEN:FieldValue Name="CompanyName"/></td>
<td><GEN:FieldValue Name="Address"/></td>
<td><GEN:FieldValue Name="City"/></td>
<td><GEN:FieldValue Name="State"/></td>
<td><GEN:FieldValue Name="ZipCode"/></td>
<td><GEN:FieldValue Name="Country"/></td>
<td><GEN:FieldValue Name="PhoneNumber"/></td>
</tr>
</GEN:ItemTemplate>
</table>
</GEN:Table>
</body>
</HTML>
AlternatingItemTemplate describes the layout of an alternating row in the table, a mechanism for
implementing green bars.
z Page 154
The ItemTemplate, AlternatingItemTemplate and SeparatorTemplate code generation tags are special tags that allow
you to specify a section of layout that may be repeated by an application as needed.
The ItemTemplate code generation tag specifies the repeating record for each row of a table. The contents within the
ItemTemplate tag can contain other code generation tags including FieldValue to display the value of a database field.
It is not necessary that each record is displayed as a row in table. The records can be displayed in any configuration
such as three records to a physical row in a table.
The Table tag may optionally contain the AlternatingItemTemplate tag to specify an alternating row within a table and a
SeparatorTemplate tag to specify the separator after each row. The HeaderTemplate and FooterTemplate tags can
also be used to specify the header and footer of the table. These tags are defined later in this section. If the optional
tags are used, their ordering within the Table code generation tag is not important. For understandability, the
recommended order is HeaderTemplate, ItemTemplate, AlternatingItemTemplate, SeparatorTemplate and
FooterTemplate. There should be no HTML code present between any of the template code generation tags.
There should be no HTML code present between any of the template code generation tags.
A simple table with an ItemTemplate tag specifying the row layout and no other specification tags.
z Page 155
A more complex table employing a HeaderTemplate tag, ItemTemplate tag, and a SeparatorTemplate tag. The
HeaderTemplate tag specifies the column headings; the ItemTemplate tag specifies the layout of the individual
rows; and the SeparatorTemplate specifies the horizontal line separating each row.
The Table and Template code generation tags generate a Repeater control to create the repeating elements. You
may want to review the .NET documentation for an in-depth understanding of how the Repeater controls work.
Editable Tables
Iron Speed Designer does not differentiate between display-only and editable tables. Individual fields within the table
may be display-only or editable. To make an editable table, set the individual fields within the table to be editable by
selecting the Text Box style in the tags Properties dialog. You can also set some fields to be editable, while other
fields are display-only.
Nested Table Tags
Nested Table tags can be used to display tables within tables when a foreign key relationship exists between two
database tables. Nested Table tags are used for one-to-many relationships where the inner Table tag is bound to the
"child" table of a foreign key relationship, while the outer tag (an individual Record tag or an ItemTemplate tag inside of
a Table tag) is bound to the "parent" table of the foreign key relationship. This is because the outer record's primary
key value (rather than a foreign key value) will affect the inner record(s) selected and displayed.
z Page 156
The following example shows an outer Table tag that presents a list of job applications. The inner Table tag shows the
employment history of each applicant in the outer job application table.
<GEN:TABLE NAME="Table">
<GEN:ITEMTEMPLATE NAME="ApplicationsRecordRow">
<table class="dialog_view" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="dialog_body">
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td width="120">
<table cellpadding="10" cellspacing="0" width="120" style="border: solid 1px #000000;" bgcolor="#ffffff">
<tr>
<td><img src='<GEN:FIELDVALUE NAME="ImageFV" TYPE="TextBox"></GEN:FIELDVALUE>'></td>
</tr>
</table>
</td>
<table cellpadding="0" cellspacing="0" border="0" width="200">
<tr>
<td>
<h1><GEN:FIELDVALUE NAME="FirstNameFV" TYPE="TextBox"/> <GEN:FIELDVALUE
NAME="LastNameFV" TYPE="TextBox"/><br></h1>
<GEN:FIELDVALUE NAME="AddressFV" TYPE="TextBox"></GEN:FIELDVALUE><br>
<GEN:FIELDVALUE NAME="CityFV"
TYPE="TextBox"></GEN:FIELDVALUE>, <GEN:FIELDVALUE NAME="StateFV"
TYPE="TextBox"></GEN:FIELDVALUE> <GEN:FIELDVALUE NAME="ZIPFV"
TYPE="TextBox"></GEN:FIELDVALUE><br>
<br>
<GEN:FIELDVALUE NAME="HomePhoneFV" TYPE="TextBox"></GEN:FIELDVALUE> home<br>
<GEN:FIELDVALUE NAME="WorkPhoneFV" TYPE="TextBox"></GEN:FIELDVALUE> work<br>
<br>
<a href='mailto:<GEN:FIELDVALUE NAME="EmailAddressFV"
TYPE="TextBox"></GEN:FIELDVALUE>'><GEN:FIELDVALUE NAME="EmailAddress2FV"
TYPE="TextBox"></GEN:FIELDVALUE></a><br>
<br>
Available to start on <GEN:FIELDVALUE NAME="AvaliableToStartFV"
TYPE="TextBox"></GEN:FIELDVALUE><br>
<br>
<b><GEN:FIELDVALUE NAME="JobOpeningIDFV" TYPE="TextBox"></GEN:FIELDVALUE></b>
</td>
</tr>
</table>
</td>
EMPLOYMENT HISTORY<br>
<table cellpadding="0" cellspacing="0" border="0" background="0" width="100%" height="80"
bgcolor="#ffffff">
z Page 157
<tr>
<td>
<div style="left:0; top:0;width:100%;height:80;border:1px solid black;overflow:auto;" bgcolor="white">
<%=
Me.SystemUtils.GenerateEnterKeyCaptureBeginTag(Me.FindControl("V_ForEachButtonBar1Button")) %>
<table bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" border="0" width="100%">
<GEN:TABLE NAME="EmploymentHistoryTable">
<GEN:ITEMTEMPLATE NAME="EmploymentHistoryRecordRow">
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td width="5"> </td>
<td align="left" valign="top" width="50%" class="OneToManyBox">
<b><i><GEN:FIELDVALUE NAME="JobTitleFV"></GEN:FIELDVALUE></i></b><br>
<nobr><GEN:FIELDVALUE
NAME="DateStartedFV"></GEN:FIELDVALUE> to <GEN:FIELDVALUE
NAME="DateLeftFV"></GEN:FIELDVALUE></nobr>
</td>
<td align="left" valign="top" width="50%" class="OneToManyBox">
<b><GEN:FIELDVALUE NAME="EmployerNameFV"></GEN:FIELDVALUE></b><br>
<GEN:FIELDVALUE NAME="EmployerLocationFV"></GEN:FIELDVALUE><br>
</td>
<td width="5"> </td>
</tr>
<tr>
<td colspan="4" style="border-bottom: solid 1px #cccccc"> </td>
</tr>
</GEN:ITEMTEMPLATE>
</GEN:TABLE>
</table>
</div>
</td>
</tr>
</table><br>
</tr>
</table>
</td>
</tr>
</table>
</GEN:ITEMTEMPLATE>
</GEN:TABLE>
z Page 158
Options
Description
The default number of data rows to display within the table at one time.
Typically, this numeric value is displayed in the Pagination control associated
with the table and can be adjusted at run-time by the application user.
To get an unlimited number of records to be displayed on the page, set the
default page size to -1.
When the table is initially displayed, the data is sorted according to the Default
Sort Order. Application users may change this sort order by clicking on any of
the tables sortable column headings.
When the table is initially displayed, the Secondary Sort Order is applied after
the Default Sort Order. Application users may change this sort order by clicking
on any of the tables sortable column headings.
z Page 159
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot
contain spaces.
Examples
<GEN:Table Name=EmployeesTable>
<!-- other HTML code to specify the rows and columns of a table -->
</GEN:Table>
<GEN:Table Name=EmployeesTable>
<!-- table header and header row -->
<table>
<tr><td colspan=10>Header Row</td></tr>
<!-- repeating row template -->
<GEN:ItemTemplate>
<-- repeating row template -->
</GEN:ItemTemplate>
<!-- table footer -->
<tr><td colspan=10>Table Footer Row</td></tr>
</table>
</GEN:Table >
z Page 160
Used In
HTML Layout Pages and Page Templates.
The ItemTemplate tag can only be specified within a Table tag.
Code Generation Tag Attributes
None. The ItemTemplate tag does not require a Name attribute.
Examples
<GEN:Table Name=EmployeesTable>
<!-- table header and header row -->
<table>
<tr><td colspan=10>Header Row</td></tr>
<!-- repeating row template -->
<GEN:ItemTemplate>
<tr>
<td><GEN:FieldValue Name=FirstName/></td>
<td><GEN:FieldValue Name=LastName/></td>
<td><GEN:FieldValue Name=Title/></td>
<td><GEN:FieldValue Name=Address/></td>
<td><GEN:FieldValue Name=City/></td>
<td><GEN:FieldValue Name=State/></td>
<td><GEN:FieldValue Name=ZipCode/></td>
<td><GEN:FieldValue Name=Country/></td>
<td><GEN:FieldValue Name=Phone/></td>
</tr>
</GEN:ItemTemplate>
<!-- table footer -->
<tr><td colspan=10>Table Footer Row</td></tr>
</table>
</GEN:Table>
z Page 161
same. The restriction of unique names within a page does not apply to the tags across the ItemTemplate and
AlternatingItemTemplate tags.
Used In
HTML Layout Pages and Page Templates.
The AlternatingItemTemplate tag does not require a Name attribute and it can only be specified within a Table tag.
The AlternatingItemTemplate tag is optional.
Code Generation Tag Attributes
None. The AlternatingItemTemplate tag does not require a Name attribute.
Examples
<GEN:Table Name=EmployeesTable>
<!-- table header and header row -->
<table>
<tr><td colspan=10>Header Row</td></tr>
<!-- repeating row template -->
<GEN:ItemTemplate>
<tr bgcolor=white>
<--one row shown with white background color -->
<td><GEN:FieldValue Name=FirstName/></td>
<td><GEN:FieldValue Name=LastName/></td>
<td><GEN:FieldValue Name=Title/></td>
<td><GEN:FieldValue Name=Address/></td>
<td><GEN:FieldValue Name=City/></td>
<td><GEN:FieldValue Name=State/></td>
<td><GEN:FieldValue Name=ZipCode/></td>
<td><GEN:FieldValue Name=Country/></td>
<td><GEN:FieldValue Name=Phone/></td>
</tr>
</GEN:ItemTemplate>
<GEN:AlternatingItemTemplate>
<tr bgcolor=silver>
<--alternating row shown with light gray background color -->
<td><GEN:FieldValue Name=FirstName/></td>
<td><GEN:FieldValue Name=LastName/></td>
<td><GEN:FieldValue Name=Title/></td>
<td><GEN:FieldValue Name=Address/></td>
<td><GEN:FieldValue Name=City/></td>
<td><GEN:FieldValue Name=State/></td>
<td><GEN:FieldValue Name=ZipCode/></td>
<td><GEN:FieldValue Name=Country/></td>
<td><GEN:FieldValue Name=Phone/></td>
</tr>
z Page 162
</GEN:AlternatingItemTemplate>
<!-- table footer -->
<tr><td colspan=10>Table Footer Row</td></tr>
</table>
</GEN:Table>
[ItemTemplate Contents]
When AlternatingItemTemplate tags are also used, the resulting page will be as follows:
[ItemTemplate Contents]
[SeparatorTemplate Contents]
[AlternatingItemTemplate Contents]
[SeparatorTemplate Contents]
Note that the SeparatorTemplate contents are not used at the end of either of the two examples.
In general you can incorporate the separator layout within the ItemTemplate and AlternatingItemTemplate tags itself.
The reason to include a SeparatorTemplate is to get finer control of the layout specifically related to the separator at
the end of the final row. If the separator layout is used directly within the ItemTemplate and AlternatingItemTemplate
tags, then you will always get the separator, even at the end of the last record.
Used In
HTML Layout Pages and Page Templates.
The SeparatorTemplate tag is optional and can only be specified within a Table tag.
Code Generation Tag Attributes
None. The SeparatorTemplate tag does not require a Name attribute.
z Page 163
Examples
<GEN:Table Name=EmployeesTable>
<!-- table header and header row -->
<table>
<tr><td colspan=10>Header Row</td></tr>
<!-- repeating row template -->
<GEN:ItemTemplate>
<tr bgcolor=white>
<td><GEN:FieldValue Name=FirstName/></td>
<td><GEN:FieldValue Name=LastName/></td>
<td><GEN:FieldValue Name=Title/></td>
<td><GEN:FieldValue Name=Address/></td>
<td><GEN:FieldValue Name=City/></td>
<td><GEN:FieldValue Name=State/></td>
<td><GEN:FieldValue Name=ZipCode/></td>
<td><GEN:FieldValue Name=Country/></td>
<td><GEN:FieldValue Name=Phone/></td>
</tr>
</GEN:ItemTemplate>
<GEN:AlternatingItemTemplate>
<tr bgcolor=silver>
<td><GEN:FieldValue Name=FirstName/></td>
<td><GEN:FieldValue Name=LastName/></td>
<td><GEN:FieldValue Name=Title/></td>
<td><GEN:FieldValue Name=Address/></td>
<td><GEN:FieldValue Name=City/></td>
<td><GEN:FieldValue Name=State/></td>
<td><GEN:FieldValue Name=ZipCode/></td>
<td><GEN:FieldValue Name=Country/></td>
<td><GEN:FieldValue Name=Phone/></td>
</tr>
</GEN:AlternatingItemTempalte>
<GEN:SeparatorTemplate>
<tr bgcolor=black>
<td colspan=9></td>
</tr>
</GEN:SeparatorTemplate >
<!-- table footer -->
<tr><td colspan=10>Table Footer Row</td></tr>
</table>
</GEN:Table>
z Page 164
z Page 165
z Page 166
</GEN:FooterTemplate>
</table>
</GEN:Table>
z Page 167
Set the specific field whose total is desired is in the tags Properties dialog.
To display a count of records returned by the current query, you can use the GEN:Pagination Type=TotalItems. The
Pagination tag is described elsewhere in this document.
z Page 168
Options
Description
Statistic Type
Specifies the database table containing the field whose statistic is being calculated.
Field
Scope
The statistic is calculated for the entire database table, after taking into
account any filters and other limiting criteria applied to the table.
Current Page
The statistic is calculated for only those rows displayed on the current
page.
Used In
HTML Layout Pages and Page Templates within a GEN:Table code generation tag.
Code Generation Tag Attributes
Attribute
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Type
Yes
The type of this tag. The only type supported currently is sum. In the future, this
tag may support additional types such as max or min.
z Page 169
Attribute
Required
Description
Scope
Yes
This attribute specifies the scope of the statistic. The two choices are:
CurrentPage
Displays the page total for all records displayed on the current
page. If only 10 records out of a possible of 100 records are
displayed on the current page, the CurrentPage displays the
total for the 10 records displayed on the screen.
AllPages
Displays the grand total for all records in the current query.
For example, if an application user filters a table to show only
the orders during the month of January, then the AllPages
scope will display the total order amount for all January orders
even if these orders are displayed across multiple pages in
the table.
Examples
<GEN:Table Name=EmployeesTable>
<table>
<GEN:ItemTemplate>
<tr bgcolor=white>
<td><GEN:FieldValue Name=FirstName/></td>
<td><GEN:FieldValue Name=LastName/></td>
<td><GEN:FieldValue Name=Title/></td>
<td><GEN:FieldValue Name=Address/></td>
<td><GEN:FieldValue Name=City/></td>
<td><GEN:FieldValue Name=State/></td>
<td><GEN:FieldValue Name=ZipCode/></td>
<td><GEN:FieldValue Name=Country/></td>
<td><GEN:FieldValue Name=Phone/></td>
</tr>
</GEN:ItemTemplate>
<!-- table footer -->
<GEN:FooterTemplate>
<tr>
<td colspan=1>Page Total</td>
<td colspan=10>
<GEN:FieldStatistic Name=PageTotal Type=Sum Scope=CurrentPage/>
</td>
</tr>
<tr>
<td colspan=1>Grand Total</td>
<td colspan=10>
z Page 170
Used In
HTML Layout Pages and Page Templates within a GEN:Table code generation tag.
z Page 171
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
z Page 172
Attribute
Required
Description
Type
Yes
The type of this tag. There are ten different types of pagination controls split into
two groups:
Display-only controls: These controls display information about the current page
being displayed.
FirstItem
LastItem
CurrentPage
TotalItems
TotalPages
Action controls: The action controls are attached to a button or a text box to
enable the application user to change the items displayed on the table.
FirstPage
LastPage
NextPage
PreviousPage
PageSize
z Page 173
Examples
<GEN:Table Name=EmployeesTable>
<!-- pagination control -->
<GEN:Button Name=FirstPageButton/>
<GEN:Pagination Name=FirstPage Type=FirstPage/>
< GEN:Button Name=PreviousPageButton/>
< GEN:Pagination Name=PreviousPage Type=PreviousPage/>
< GEN:Pagination Name=CurrentPage Type=CurrentPage/>
< GEN:Button Name=NextPageButton/>
< GEN:Pagination Name=NextPage Type=NextPage/>
< GEN:Button Name=LastPageButton/>
< GEN:Pagination Name=LastPage Type=LastPage/>
<table>
<GEN:ItemTemplate>
</GEN:ItemTemplate>
</table>
</GEN:Table>
z Page 174
Specify the table and field whose total is desired in the tags Properties dialog.
TableStatistic Tag Properties -- Display Properties
Options
Description
Field
Statistic Type
Sum
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
z Page 175
Attribute
Required
Description
Type
Yes
The type of information to display. The following two types are supported:
Count
Sum
Displays the sum of a field for all the records returned by the query
specified in the tags Properties dialog.
Examples
<table>
<tr>
<td>Sales Quotes Sent</td>
<td<GEN:TableStatistic Name=QuotesSent Type=Count/></td>
</tr>
<tr>
<td>Dollar Value of Quotes Outstanding</td>
<td<GEN:TableStatistic Name=QuotesValue Type=Sum/></td>
</tr>
</table>
z Page 176
BUTTON TAGS
The Button tags display three button types on a generated page.
For more detail, see:
To display an image from a database, use the FieldValue code generation tag (Type=Image or the
Type=ImageButton) described in FieldValue Code Generation Tag.
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
z Page 177
Examples
<GEN:ImageButton Name=EditAddress/>
Note:
To display a link for data from a database, use the GEN:FieldValue Type=LinkButton tag described in
FieldValue Code Generation Tag.
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
z Page 178
Examples
<GEN:LinkButton Name=AboutUsLink/>
The PushButton tag displays the button as an HTML <input type=submit ../> tag.
Note:
To display a push button with data from a database, use the GEN:FieldValue Type=PushButton tag described
elsewhere in this document.
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Examples
<GEN:PushButton Name=PlaceOrder/>
z Page 179
FILTER TAGS
The Filter tags display various filters and search control components related to a table.
For more detail, see:
This tag requires an event binding between it and another control, typically the table that it modifies. There is also a
link from the table back to the control, because changes within the table (such as searching for something) will affect
the number of records being displayed in the table and will affect the values being displayed in the control. You must
manually hook up the control to the table in the tags Properties dialog.
z Page 180
The fields displayed in the CategoryFilter are not required to be displayed in the table shown to the user.
CategoryFilter Tag Categories Properties
CategoryFilter tag properties.
Options
Description
Selected fields
Specifies one or more fields in the Table. The categorization drill-down occurs in the
order selected. You may specify as many fields as you wish.
Used In
HTML Layout Pages and Page Templates
Code Generation Tag Attributes
Attribute
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
z Page 181
Attribute
Required
Description
Type
Yes
The type of information to display. The following two types are supported:
Path
SubCategory
Examples
<tr>
<td>
<GEN:CategoryFilter Name=ProductsCategoryFilter Type=Path/>
<GEN:CategoryFilter Name=ProductsSubCategoryFilter Type=SubCategory/>
</td>
</tr>
z Page 182
Similarly, the order of the columns is specified in the filtered table control as well. In summary, a filter limits the
records displayed, and for each table control, you can control which columns are displayed, what order they are
displayed in, how wide each column is, how the data is sorted, and what types of records to display.
The filter type displayed depends on the field type:
Field Type
Filter Generates
Currency
Date
Decimal Number
Number
Percentage
Field selection filter (dropdown combo box). The dropdown filters filter
immediately when changed and do not have a Go button
You can specify the display style for the FieldFilter to be as a dropdown or a text box. If a dropdown is specified, the
list of current values will be displayed in the dropdown. The current values are all the values that are in the current
query including items that are displayed on subsequent pages. If a text box is specified, the application user can type
a text value in the text box. You can also specify the operator to use to compare the text value specified in the text
box. For example, to search for any names starting with the typed text string, specify the operator as begins with/
This tag requires an event binding between it and another control, typically the table that it modifies. You must
manually hook up the control to the table in the tags Properties dialog.
The fields displayed in the FieldFilter are not required to be displayed in the table shown to the user.
FieldFilter Tag Properties -- Display Properties
z Page 183
Options
Description
Display Style
Dropdown List
Text Box
The Text Box display style option displays a text entry box.
Application uses can enter any text, and the associated
database table and field will be searched for matching entries.
Width, in characters, of the text box used to enter the search string.
z Page 184
Options
Description
Table
Field
Operator
Ignore time
Used In
HTML Layout Pages and Page Templates
Code Generation Tag Attributes
Attribute
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Examples
<GEN:FieldFilter Name=StartDate/>
<GEN:FieldFilter Name=EndDateDate/>
<GEN:FieldFilter Name=StateOfResidence/>
z Page 185
The SearchFilter tag displays a text box for the application user to enter a value to be searched. The search can be
performed against any field in a table using a comparison operator. Only designated columns are searched by the
search control.
If the display style is a text box, then the generated control must be bound to a button. When the button is pressed,
the value entered by the application user is searched for within the table.
This tag requires an event binding between it and another control, typically the table that it modifies. You must
manually hook up the control to the table in the tags Properties dialog.
The fields displayed in the SearchFilter are not required to be displayed in the table shown to the user.
SearchFilter Tag Properties -- Display Properties
z Page 186
Options
Description
Width, in characters, of the text box used to enter the search string.
Options
Description
Fields
Operator
Case-sensitive
Used In
HTML Layout Pages and Page Templates
z Page 187
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Examples
<GEN:SearchFilter Name=Search/>
z Page 188
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
z Page 189
Attribute
Required
Description
Type
Yes
File
No
Any
Button
Footer
Header
Menu
Pagination
RangeFilter
Search
UserControl
Specifies the default component to use. You can change the specific component
to point to a different component in the tags Properties dialog.
Examples
<GEN:Use Name=MyMenu Type=Menu File=../Components/Menu.html/>
z Page 190
z Page 191
OTHER TAGS
There are some tags that are used by Iron Speed Designer in page template files to assist in the creation of the layout
pages. Additional tags are used to provide some information about the file. These tags have no impact on page
generation.
For more detail, see:
z Page 192
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
File
No
Specifies the default component to use. You can change the specific component
to point to a different component in the tags Properties dialog.
Examples
<GEN:Group Name=EmployeeFields>
<GEN:FieldValue Name=FirstName/>
<GEN:FieldValue Name=LastName/>
<GEN:FieldValue Name=Address/>
<GEN:FieldValue Name=City/>
<GEN:FieldValue Name=State/>
<GEN:FieldValue Name=ZipCode/>
</GEN:Group>
z Page 193
Required
Description
Name
Yes
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Examples
<GEN:Template Type=AddOneRecord/>
z Page 194
Required
Yes
Description
The following types can be specified:
AddOneRecord
EditOneRecord
EditMultipleRecords
ViewOneRecord
ViewMultipleRecords
Examples
<GEN:Template Type=ViewOneRecord/>
z Page 195
Required
Yes
Description
The name of this tag. This name must be unique within the file and cannot contain
spaces.
Examples
<GEN:Align Name=AlignFieldValue>
z Page 196
z Page 197
Description
Field
Required
Options
Description
Text Styles
Specifies the type of control to be generated. Each of the different display styles has
additional options, which are described in the following sections.
Label
z Page 198
Options
Description
layer. You may also add formatting via pass-through attributes in the
tags Properties dialog.
Literal
z Page 199
Options
Description
List Styles
Dropdown List
The Dropdown List display style option displays a list of values, either
retrieved from the database or provided directly by you. This works
well for fields that have from 3 to about 200 values.
If the list is retrieved from the database, it will contain all values used
in the designated Display Table and Field.
If you specify a list, those values will be displayed in the dropdown
list.
List Box
The List Box display style option displays a list of values, either
retrieved from the database or provided directly by you. This works
well for fields with 2 to about 100 values.
Radio Button
List
z Page 200
Options
Description
Button Styles
Image Button
Link Button
Push Button
z Page 201
Options
Other Styles
Description
Check Box
Displays a check box. This display style is ideal for Boolean fields.
The checkbox itself is unadorned. You will want to place some text in
proximity to the checkbox within your layout page, indicating what the
checkbox is for.
Checked is mapped to the string "Yes" by default. Unchecked is
mapped to the string "" (Null) by default. Every other value maps to
unchecked by default. All mappings can be changed using these
pass-through properties:
CheckedValue As String
UncheckedValue As String
TreatOtherValuesAsChecked As Boolean.
File Upload
Displays a text entry field and a Browse button for selecting a file
name. When the page is submitted, the file is uploaded into the
designated database table and field.
Image
If the database field does not contain an image, the broken image
symbol is displayed by your web browser.
z Page 202
Options
Description
Select this option to build the dropdown list from the database. If not selected,
you must manually provide the list of values.
Maximum items to
display
Specifies the maximum number of items to be fetched from the database. If the
number of rows in the database exceeds Maximum Items, only Maximum Items
will be retrieved. This limits the size of the dropdown list, limiting the database
server load in certain cases.
Specify Items
z Page 203
Options
Description
Specifies the text to be displayed or inserted into the database if the underlying
database field has a null value (no value).
HTML encode
white space
Respects the white space, carriage return and line feed characters in the HTML. White
space is preserved. For example, if you have 10 contiguous spaces, 10 spaces will be
output in the field.
z Page 204
Options
Description
Select this option to build the dropdown list from the database. If not selected,
you must manually provide the list of values.
Maximum items to
display
Specifies the maximum number of items to be fetched from the database. If the
number of rows in the database exceeds Maximum Items, only Maximum Items
will be retrieved. This limits the size of the dropdown list, limiting the database
server load in certain cases.
Specify Items
z Page 205
Options
Description
Specifies the text to be displayed or inserted into the database if the underlying
database field has a null value (no value).
HTML encode
white space
Respects the white space, carriage return and line feed characters in the HTML. White
space is preserved. For example, if you have 10 contiguous spaces, 10 spaces will be
output in the field.
Options
Description
Select this option to build a set of radio buttons from the database. If not
selected, you must manually provide the list of values.
z Page 206
Options
Description
Maximum items to
display
Specifies the maximum number of items to be fetched from the database. If the
number of rows in the database exceeds Maximum Items, only Maximum Items
will be retrieved. This limits the size of the list, limiting the database server load in
certain cases.
Specify Items
z Page 207
Options
Description
Specifies the percentage of the table control that should be devoted to the column in the
form <Number><Unit Type>.
Relative length units
Em
Ex
Px
Pixels.
Inches.
Cm
Centimeters.
Mm
Millimeters.
Pt
Pc
Text mode
z Page 208
Options
Description
Button Text
The text to display in the button or link. This applies only to Link Buttons and
Push Buttons.
Image URLs that are file names are assumed to reside in the same runtime directory as the page being bound.
Image URLs that are relative will be relative to their page's corresponding
run-time directory, not the app's directory.
Example:
Binding an Image tag in the layout page file MyApp\Source\OtherPages\test.html
to "image1.gif" will create an effective reference to
MyApp\OtherPages\image1.gif.
Binding this same image to "../Images/image2.gif" will generate an effective
reference to MyApp\Images\image2.gif.
z Page 209
Options
Description
Tool Tip
Pop-up help text displayed when the application user moves their mouse over the
button.
Button Action
The button action specifies what transaction operation the button performs when it is clicked.
Button actions.
Options
Description
The data entered into the page is validated by the application. All data in each
data entry control on the page is validated.
Action
Delete Record
Export Data
z Page 210
Options
Description
Log Out
Redirect
Refresh Data
Search
Update Data
Custom
z Page 211
Options
Description
Custom action
Options
Description
Send notification
event to
(Consumers)
Designates a consumer of the button event. When the button is activated, the
application generates an event that informs other controls that the button has
been clicked. This allows other controls to take action based on the event. This
property designates which component, if any, receives the event.
None
Page
Parent
Parent Record
Parent Table
Go to Page
The Go to Page section specifies which application page should be displayed after the button is clicked and the button
action performed.
z Page 212
z Page 213
Options
Description
Redirect URL
The URL of the page to be displayed when the button is clicked. The URL may
include hard-coded arguments as well as parameterized arguments.
The special arguments that may be entered into this field are:
{0}
{1}
etc.
Back
Close
Clicking the button will cause it to emit client script during the post
back that will close the browser window when the post back's Http
Response is sent back to the browser.
Since Iron Speed Designer does not (currently) easily support
applications that use multiple browsers in the same session, this
feature is currently most useful in conjunction with customization.
However, there may be rare situations where a developer might want
to use it without customization, such as an applications sign out
button to use the Close Redirect Url instead of redirecting to a sign
out confirmation page.
Redirect
Parameters
URL parameters, if any, to pass to the page being displayed. There are several
special parameters described in Redirect Parameter Types below.
z Page 214
or
<Type>:<Value>
Value
Description
ID
None
PK
None
FK
FV
Field Value
The value of the field specified as the Value. The value is the same as it is
in the database.
FVS
The value of the field as a Value String. This is the same as Field Value,
but converted into a string.
FDV
The value of the field as a Display String. The display string may be
different than the value in the database because you may have selected a
different display format.
updatedata
None
This argument can be used with the special Redirect URL "Back", which is
related to page history (Back key) handling.
The benefit of using the Redirect Parameters of "updatedata" is that you
can return to your Show Table page (e.g. from an Edit Record page) and
see the freshest data available at the time you return to the Show Table
page.
z Page 215
Setting
Button Text
Add
Action
Redirect
Parent Record
Redirect URL
./EmployeeFKLink.aspx?Employee={0}
Redirect Parameters
FK:FK_Employees_Employees
In the example shown above, the Redirect URL uses an argument {0} to indicate the substation of the first argument.
The argument itself is specified in the Redirect Parameters field as FK:FK_Employees_Employees. This means that
the parameter {0} should be substituted with the foreign key (FK) value as specified by FK_Employees_Employees.
The FK_Employees_Employees name is created by Microsoft SQL Server to show a foreign key link between the
employee table and another record in the Employees table (the manager of the employee).
Passing Primary Key Values between Pages in URLs
Passing primary key values from one page to another via URLs is very straightforward. In the tags Properties dialog,
specify:
z Page 216
Tag Property
Setting
Action
Redirect
Parent Record
Redirect URL
{0}
Redirect Parameters
ID
This passes the primary key value to the destination page via the URL. Even though the argument is called ID, what
is passed to the URL is an XML element that specifies the full primary key of the record. If the primary key is
composite key, the composite key is passed as an argument.
If the ID of the field is a single integer value, you can use the FV Redirect Parameter type to pass the value to the
URL. However, if you later change the Id to a more complex key, your existing pages will not work correctly. As such,
we recommend always using the ID or PK Redirect Parameter types to pass primary keys to other pages.
Passing Other Values Between Pages
As discussed earlier, you can use the Redirect Parameters types to pass any field value to a page via its URL. For
example, to pass the first and last names from an Employee record, specify the URL and the Redirect Parameters as
follows:
Tag Property
Setting
Action
Redirect
Parent Record
Redirect URL
ShowEmployeePhotoRecord.aspx?First={0}&Last={1}
Redirect Parameters
FV:FirstName,FV:LastName
z Page 217
the current page to stop processing immediately. Therefore, some situations may require a combination of event
interaction and page redirection.
There are many contexts in which passing data from one page to another via the URL is a convenient means of
transferring data. This example passes the Ids of two products to a page to show how parameter passing works. Two
products are displayed as a result of this example.
Two different products are selected for display by passing
their respective primary key values to an application page
via URL query string parameters.
Procedure
Step 1: Create a new layout page file containing two products as follows:
<div align="center">
<GEN:Record Name="Product">
<table cellpadding="5" style="border-collapse: collapse" border="1" bordercolorlight="#C0C0C0"
bordercolordark="#C0C0C0">
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Product Id:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="ProductId" />
</td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Product Name:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="ProductName" />
</td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Unit Price:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="UnitPrice" />
</td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Units in Stock:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="UnitsInStock" />
</td>
</tr>
</table>
z Page 218
</GEN:Record>
</div>
Step 2: In the tags Properties dialog, set the data source as the Products table. Also specify the URL parameter as
P1:
Tag Property
Setting
Product
Products
P1
Step 3: Repeat this step for the second Product code generation tag. This time specify a different name for the query
string parameter such as P2.
Step 4: Set the data binding properties of the FieldValue tags to their respective database fields.
Step 5: Build and run your application.
z Page 219
Setting
../Images/Everest/Icon_edit.gif
Action
Redirect
Parent Record
Redirect URL
EditEmployeeRecord.aspx?Employees={0}
Redirect Parameters
ID
z Page 220
Setting
Button Text
OK
Action
Update Data
Parent Record
Redirect URL
Back
This causes the next page displayed to be the previous page in the browsers
history.
Redirect Parameters
Updatedata
This causes the table on the destination page to be refreshed, pulling fresh
data from the database.
z Page 221
Setting
Button Text
Export to PDF
No
Action
Custom
Custom action
DisplayAsPDF
Page
Redirect URL
Redirect Parameters
The invoked code is typically placed in the associated pages safe class (details about this are found elsewhere in this
manual). To catch the function call, override the OnIronSpeedEvent function. The OnIronSpeedEvent function
implements an event handler that is called when the new Export to PDF button is clicked. In this example, the
DisplayReportAsPDF function connects to the data base, populates the report, and then displays it in the web browser.
' This method handles the IronSpeedEvent produced by the ExportToPDF button
Public Overrides Sub OnIronSpeedEvent(ByVal args As IronSpeed.Base.IronSpeedEventArgs)
' Handle the custom "DisplayAsPDF" command, but pass others off to the base class
If args.EventType = IronSpeed.Base.IronSpeedEventArgs.EventTypes.Custom AndAlso _
args.CustomEventName = "DisplayAsPDF" Then
'' create the report object and produce the report
Dim crReportDocument As New ProductsList()
DisplayReportAsPDF(crReportDocument)
Else
' not the custom "DisplayAsPDF" command, pass it on
MyBase.OnIronSpeedEvent(args)
End If
End Sub
z Page 222
validate and update the database. As such, they do not support redirecting the target to another window. Some of
these buttons produce an <a href ...> HTML tag, but their OnClick action is set to a Javascript function to validate data
if required.
The best way to launch a new browser window when clicking a button is to use a GEN:Hyperlink tag, which can be
made to look like a button using standard HTML. (Use one of the button template files, such as Button-Everest.html,
for guidance. Once you copy those files, you can change them to use GEN:Hyperlink and use these copied files
where you want to open a new window.)
Using GEN:Hyperlink, set Target = _blank to open a new window.
z Page 223
Design-time filtering
Since the data sources are set at design time, application users cant change your data sources. Moreover, if you add
additional application user filtering via a RangeFilter, DateFilter or similar control, these application user filters further
constrain the selection criteria; however, they cant override the built-in selection criteria specified at the component
level.
z Page 224
Record selection
One or more records can be selected as a result of the data sources you specify. In the case of a Table tag, all
records selected are available for display in the Table control. In the case of a FieldValue tag, only the first record
returned is actually displayed in the FieldValue control, since a FieldValue control is capable of displaying only one
field from a single record.
This section contains information about:
z Page 225
This option also applies to the FieldValue tag if it is enclosed within a row of a table being displayed. This is
meaningful in the context of a FieldValue tag in a table, in which the "current row" in the table is bound to a particular
record. As the table iterates over each record in the result set, each corresponding record is fetched and the
appropriate field values retrieved and displayed.
If you need to specify the field value independently of the enclosing record, or need to hop multiple times to go to a
different record, then you can select From table or query. Selecting this option allows you to select a table or a fully
specified query.
<GEN:Record Name=Customer>
<td><GEN:FieldValue Name="FirstName"/></td>
<td><GEN:FieldValue Name="LastName"/></td>
<td><GEN:FieldValue Name="Address"/></td>
<td><GEN:FieldValue Name="City"/></td>
<td><GEN:FieldValue Name="State"/></td>
<td><GEN:FieldValue Name="ZipCode"/></td>
<td><GEN:FieldValue Name="Country"/></td>
</GEN:Record>
z Page 226
Furthermore, you can add additional filter criteria to further filter the previously defined query or the records from the
table.
If you select a query from the dropdown list, then the From URL query string parameter option will not be
available, though you can still add additional Where clauses.
You can add additional filter criteria regardless of whether a table or a query is selected and regardless of
whether a URL query string attribute is specified.
z Page 227
The field, or group of fields, enclosed by a Record tag is added as a new record to the database. Consequently, there
is no source for the data to be displayed because the particular control or associated group of controls is displayed
without any pre-set data.
<GEN:Record Name=Customer>
<td><GEN:FieldValue Name="FirstName"/></td>
<td><GEN:FieldValue Name="LastName"/></td>
<td><GEN:FieldValue Name="Address"/></td>
<td><GEN:FieldValue Name="City"/></td>
<td><GEN:FieldValue Name="State"/></td>
<td><GEN:FieldValue Name="ZipCode"/></td>
<td><GEN:FieldValue Name="Country"/></td>
</GEN:Record>
z Page 228
There are many contexts in which passing data from one page to another via the URL is a convenient means of
transferring data. Parameters such as primary and foreign key values can be passed from one page to another
through the destination pages URL. These URLs are specified in the tags Properties dialog. For example, you can
create a "wizard" from a New Orders page to a New Order Details page by passing the OrderID of the new Orders
record on the URL so that the OrderDetails.OrderID field is automatically set in the New Order Details page.
A simple URL with a query string parameter is:
http://OrderManagementSystem/ShowOrder.aspx?ID=10248
z Page 229
Order.OrderID is equal to ID
In this example, the text string ID is specified as the query string parameter in the tags Properties dialog. The query
string parameter ID is then used in the pages URL. The application recognizes ID as a valid query string
parameter and uses the value assigned to ID in the URL as part of the generated SQL query.
The query string parameter can be any alphanumeric string you wish. It does not have to match the database tables
field name or correspond to anything else. Your application will parse the query string, extract the appropriate
parameter and value, and perform the record lookup in the appropriate database table.
In use, the query string parameter follows the URL, as does ID in this example:
z Page 230
The parent tag specifies the table containing the foreign key value. Only those foreign key relationships known to Iron
Speed Designer are shown (Iron Speed Designer cant read your mind). Foreign key relationships can be:
Explicit. Explicit foreign key relationships are defined in the database itself. Iron Speed Designer
automatically detects these foreign key relationships and uses them when generating your application.
Developers or DBAs typically enforce foreign key constraints within the database.
Implicit (virtual). Implicit foreign key relationships are not defined in the database. Instead, you identify these
implicit foreign key relationships to Iron Speed Designer via the Virtual Foreign Key facility on the Database
tab. (For more details on adding virtual foreign key relationships to your application, see Adding Virtual
Foreign Key Relationships in this Guide.)
If you select a foreign key relationship, then Iron Speed Designer generates an additional Record control inside the
first Record control. The inner Record control specifies the relationship between the two Record controls.
z Page 231
You may specify custom selection criteria. This option is most commonly used when displaying records resulting from
a multi-table join where data from several database tables are displayed. Additional filtering criteria may be applied to
the multi-table join. For example, you may display a table containing information from the Orders and Customers
table, showing only orders greater than $1,000. Or, you might display information only pertaining to the currently
signed in user, allowing them to see only their own information.
Use the Add/Edit WHERE Clause dialog to add additional filter criteria.
Iron Speed Designer automatically generates the SQL query required to join the selected tables together. Any number
of tables may be included in the join and any number of joining conditions may be applied to filter the result set.
For more detail, see:
z Page 232
The following example shows two selection criteria that join three tables: Order, OrderDetails, and Customer. The
resulting data set will include rows matching only these selection criteria and will include fields from all three tables.
Order.OrderID is equal to OrderDetails.OrderID AND
Order.CustomerID is equal to Customer.CustomerID
Note: You can select a table that not been previously connected through another filter criteria clause and then add
another clause connecting this table later. As such, you can specify an invalid selection criterion or one that returns
no records.
Or, you might constrain the data to orders larger than $50,000, e.g.:
Order.TotalAmount is greater than 50000
The Constant selection criteria is most frequently used with numerical and string values, though dates and other field
types can be used as well. This value is specified in string format and converted to the data type of the field selected
on the left hand side.
z Page 233
You can combine Constant criteria with other selection criteria to create more refined data sets, e.g.:
Order.SalesTerritory is equal to Western Region AND
Order.TotalAmount is greater than 50000 AND
Order.SalesPersonID is equal to LoggedInUserID()
This example selects order data from the Western Region over $50,000 for the currently logged in sales person, giving
the sales person a custom report showing only his or her large orders.
There are many contexts in which passing data from one page to another via the URL is a convenient means of
transferring data. Parameters such as primary and foreign key values can be passed from one page to another
through the destination pages URL. These URLs are specified in the tags Properties dialog. For example, you can
create a "wizard" from a New Orders page to a New Order Details page by passing the OrderID of the new Orders
record on the URL so that the OrderDetails.OrderID field is automatically set in the New Order Details page.
A simple URL with a query string parameter is:
http://OrderManagementSystem/ShowOrder.aspx?ID=10248
In this example, the text string ID is specified as the query string parameter in the tags Properties dialog. The query
string parameter ID is then used in the pages URL. The application recognizes ID as a valid query string
parameter and uses the value assigned to ID in the URL as part of the generated SQL query.
z Page 234
display only orders relevant to a particular customer; it would be inappropriate to show every customers orders to
everyone. Similarly, you may wish to constrain a sales persons view to only orders from their accounts.
Select the LoggedInUserID() built-in
function to constrain the selection criteria
to retrieve data for the currently logged in
user.
The best way to create such selection criteria is by using the built-in LoggedInUserID function. To create a table
showing only one customers orders, you may create selection criteria where one constraint is that the CustomerID is
LoggedInUserID() e.g.:
Order.CustomerID is equal to LoggedInUserID()
Or, you might constrain the data to orders for each sales person, e.g.:
Order.SalesRepID is equal to LoggedInUserID()
The currently logged in user ID value provided by the LoggedInUserID() function comes from the role-based security
code generated by Iron Speed Designer. This code maintains the user ID and other state information throughout your
application. More information on the role-based security mechanism generated by Iron Speed Designer is in the
Securing Your Web Pages with Role-Based Security chapter in this Guide.
Function
Description
LoggedInUserID()
Provides the User ID of the currently logged in user. This value is set when an
application user signs into the application. The User ID value is taken from the User
table designated via the Role-Based Security Wizard. (See Securing Your Web
Pages with Role-Based Security in Part II of this Guide.)
z Page 235
included in or excluded from result set. When Iron Speed Designer generates your application, it creates the
addFilter mechanism that applies the comparison.
To create a table showing only products that are affordable by a particular customer, you may create selection criteria
where one constraint is that the product cost is less than the available credit capacity, e.g.:
Product.Price is less than Me.calcAvailableCredit()
Custom functions should return values that appropriately matches the left side of the filter clause. Its important to note
that custom functions are not filtering functions themselves; they simply provide a value which is used by the
generated filtering code when comparing record field values to the value returned by the custom function.
Custom Function Example
The following example shows a custom function call within a table query. It filters the data displayed by a Show Table
page for the Products table thats derived from the example Northwind database, and shows only product records that
have an on order level that exceeds 65 units.
This code is inserted into the Products Show Table pages safe class at the end of the TableProducts class (this is
the first class of three class definitions in the file).
' returns the maximum On Order level currently allowed
Public Shared Function MaxOnOrderLevel() As String
' (For simplicity, this function simply returns a hard-coded value.
' In a "real-world" application, this value would probably be
' calculated dynamically by some external process.)
' Maximum On Order level is sixty-five units
Return "65"
End Function
Note this function can actually be added anywhere in the project thats accessible by the Show Tables generated
class. In this case, the custom function is a shared method on the Show Tables safe class.
z Page 236
In Iron Speed Designer, a query selection criteria (clause) is added that selects records that have a Units.OnOrder
level greater than the custom function TableProducts.MaxOnOrderLevel().
z Page 237
z Page 238
FieldValue, Record Control, and Table Control Query Panel Pass-Through Attributes
z Page 239
z Page 240
The presence and/or value of specific pass-through attributes could, in some cases, be affected by code customization
(making the attributes be ignored, have a different effect, etc.) and/or affect code customization (making certain
customizations impossible, harder, or work differently). This case is rare, though.
Overriding Pass-Through Attributes
Pass-through attributes cannot be "overridden" directly from the tags Properties dialog. Any pass-through name
containing a dash is considered an override. For example, "OnClick" is an allowed pass-through because it sets an
attribute, and "P_Button-Text" is allowed because it overrides a Property, but "P_Button-OnClick" is not permitted
because it overrides an Attribute.
However, a special set of "wrapper" Properties (not Attributes) can be overridden. Overriding a wrapper Property is
equivalent at runtime to overriding the Attribute itself.
Since only public Properties (not Attributes) of a control can be overridden across User Control (panel) boundaries, a
control's "wrapped" Attributes can be set declaratively (using pass-through attributes), even across User Control
(panel) boundaries. For example, a specific pages Menu's MenuItem's LinkButton's "onBlur" Attribute can be
overridden by setting a pass-through similar to the following on the Page's Menu component/tag:
P_<MenuItem tag name>-P_Button-HtmlAttributes-onBlur
Trying to set the Attribute directly using "P_<MenuItem tag name>-P_Button-onBlur" would have no effect on the
LinkButton, because LinkButtons do not have a Public Property named "onBlur".
You can customize the behavior and appearance of paneled controls (e.g. Buttons, MenuItems, and Pagination panel
contents) from outside the panel without code customization. From the tags Properties dialog, for example, you can:
Make a control display text in Internet Explorers status area when the user hovers over the control.
Add advanced client-side behavior to buttons and other controls by overriding the Javascript event handler
attributes such as onClick, onFocus, OnBlur, onMouseMove, onKeyDown, etc.
Description
Style
Label
This is the tags display style.
z Page 241
Pass-Through Attribute
Description
Font-Bold
True
Description
Style
Literal
Leave unchanged.
TextFormat
<b>{0}</b>
HtmlEncodeValue
False
Both of these methods can be used within Iron Speed Designer and with no Visual Basic code customization.
Example: Add a mouse over message to a button tag
Set the following pass-through attributes in the Properties dialog for an ImageButton, LinkButton, or PushButton tag:
Pass-Through Attribute
Description
P_Button-HtmlAttributes-onMouseMove
javascript:window.status=Hovering;
P_Button-HtmlAttributes-onMouseOut
javascript: window.status=;
After building and running the application, watch the browsers status bar. Youll notice the custom message appears
when you hover over the button.
Setting Initial Values with Pass-Through Attributes
Providing initial valuesv for FieldValue tags is easily accomplished using pass-through attributes to set the property to
be initialized (the "Text" property, for example) and specifying that the pass-through attribute to be "unencoded".
However, for this to work, other pass-through attributes must also be specified to override the default behavior that
FieldValue data is automatically loaded from and saved to the database.
LoadData="False". This suppresses the loading of the fields data from the database. The LoadData passthrough attribute defaults to True, so setting it to False allows you to always initialize a field to a particular
value.
SaveData="False". This suppresses saving the fields data to the database. The SaveData pass-through
attribute defaults to True for some FieldValue display styles and to False for others. Other FieldValue
z Page 242
display styles, such as the Link Button, dont allow SaveData=True. Setting it to False allows you to always
save a particular value for the field, such as the logged in user ID or the current date and time.
Description
CausesValidation
The data entered into the page is validated by the application. All data in each data
entry control on the page is validated.
CommandArgument
true
The data entered into the page is validated by the application. All data in
each data entry control on the page is validated.
False
The data entered into the page is not validated by the application.
CommandName
z Page 243
Pass-Through
Attribute
Consumers
Description
AddRecord
DeleteRecord
ExportData
Export data from the associated table. A file selection dialog box
is displayed when an Export Data button is clicked, prompting
the application user for a file name into which the data is
exported.
FilterData
GotoNext
GotoPrevious
LogOut
Redirect
Reset Data
Search
UpdateData
Custom
Designates a consumer of the button event. When the button is activated, the
application generates an event that informs other controls that the button has been
z Page 244
Pass-Through
Attribute
Description
clicked. This allows other controls to take action based on the event. This property
designates which component, if any, receives the event.
None
Page
Parent
ParentRecord
ParentTable
ImageURL
RedirectArgument
URL arguments, if any, to pass to the page being displayed. There are several special
arguments described in the table below.
RedirectURL
The URL of the page to be displayed when the button is clicked. There are several
special arguments:
Back
Text
The text to display in the button or link. This applies only to Link Buttons and Push
Buttons.
ToolTip
Pop-up help text displayed when an application user moves their mouse over the
button.
z Page 245
Pass-through attributes
Description
Fields
InternalUse:Table
V_CategoryFilterPathContainer:CssClass
V_CategoryFilterSubcategoryContainer:CssClass
Pass-Through
Attribute
Description
Columns
The width of the text box if the style indicates the field filter is a text box.
Field
FieldValueStyle
The style of the field filter to display. Valid values are TextBox and DropDownList.
This is described in more detail earlier in this document.
Operator
Specifies the type of filtering operation to apply to the field. Any of the comparison
operations such as =, !=, <, <=, >, >=, etc.
Pass-Through
Attribute
Description
Field
z Page 246
Pass-Through
Attribute
Description
Table
Specifies the database table containing the field whose name is being displayed.
Text
Pass-Through
Attribute
Description
Field
Specifies the field for which the statistic is calculated. Note that you can sort on any
field you like even one that is not displayed within the table.
Table
Specifies the database table containing the field whose statistic is being calculated.
FieldStatisticType
The type of statistic to display. Count is used to display the number of records in the
table or returned by the query. Sum allows you to add the total amount based on a
field and display the total.
Pass-Through Attribute
Description
CheckedValue
Columns
CssClass
LoadData
Forces or suppresses the loading of the fields data from the database.
The LoadData pass-through attribute defaults to True, so setting it to
False allows you to always initialize a field to a particular value.
MaxGenItems
z Page 247
Pass-Through Attribute
Description
NullValueText
Rows
SaveData
TextFormat
Specifies how the value will be displayed. The value of the field is
indicated by a replacement parameter {0}. For example, to display the
field value as an image, specify the text format as:
<img src=../Pictures/{0}/>
This indicates the value must be displayed as part of an HTML IMG tag.
The location of the image is specified as the Pictures folder.
TextMode
UncheckedValue
V_<TAG NAME>FvLlsHyperLink:
Enabled
V_<TAG NAME>FvLlsHyperLink:
MinListItems
False
Specifies the minimum number of items required before the large list
selector control is automatically displayed along side the FieldValue
component.
z Page 248
Pass-Through Attribute
Description
Note: MinListItems applies only when the FieldValue tags display style
is Dropdown List.
Pass-Through
Attribute
Description
Text
The text you want to display. The text may contain HTML tags, which will be passed
through to the generated page and rendered in the application users browser.
Pass-Through
Attribute
Description
NavigateURL
Target
Text
Pass-Through
Attribute
Description
Text
The text you want to display. The text may contain HTML tags, which will be passed
through to the generated page and rendered in the application users browser.
z Page 249
Pass-Through
Attribute
Description
CaseSensitive
false
Columns
Fields
Operator
Pass-Through Attribute
Description
DataReaderAlwaysSortBy
When the table is initially displayed, the data is sorted by a secondary sorting criteria,
DataReaderAlwaysSortBy, which is applied after the DataReaderSortBy criteria.
DataReaderAlwaysSortBy only affects the sort order when the DataReaderSortBy
ordering would be satisfied by more than one permutation of the data items. That is,
the DataReaderAlwaysSortBy is a "tie-breaker" sort order. For example,
DataReaderSortBy="ProductID" will always establish a unique sort order since
ProductID is unique, and DataReaderAlwaysSortBy will not have any effect. However,
SortBy="UnitPrice" may not establish a unique sort order since several products could
have the same price. So DataReaderSortBy="UnitPrice" and
DataReaderAlwaysSortBy="ProductName" will sort all products by Price first, and all
products with the same Price would then be sorted by Name.
DataReaderSortBy
When the table is initially displayed, the data is sorted according to the field specified
by DataReaderSortBy.
PageSize
The default number of data rows to display within the table at one time. Typically, this
numeric value is displayed in the Pagination control associated with the table and can
be adjusted at run-time by the application user.
To get an unlimited number of records to be displayed on the page, set the default
z Page 250
Pass-Through Attribute
Description
page size to -1.
Pass-Through
Attribute
Description
QueryFunction
Sum
QueryParameters
TableName
Pass-Through
Attribute
Description
HiliteSettings
The name of the menu item that should be highlighted when this page is displayed. All
other items are displayed in a normal state. The name entered should be the name of
the code generation tag for the specific menu item.
Pass-Through
Attribute
Description
ParentIdField
z Page 251
The main benefit of this method of interaction is that the event producer does not need to have any knowledge of the
event consumers; it simply broadcasts messages to which all components can respond. However, the event
consumers must still exist in the same page during the same HTTP request as the event producer. Therefore, if the
user makes several client-side changes to the page before a new HTTP request to update the page (called a
postback) occurs, several different components may produce multiple events during the same request. Each of those
events could cause more events to be produced. Once all events have been consumed, the page and its components
construct the content of the HTTP response. This content could be HTML, or an HTTP 301 Redirect (see the next
section), or any other valid HTTP response stream.
z Page 252
Event hookups allow communication between various controls on a page. For example, if you are displaying a list of
customers in a table and a filter allows the application user to filter by State and Country, then each filter must inform
the table when the application user selects a different value. This communication is accomplished through event
hookups. The filter in this case is a Producer of the event and the table is a Consumer of the event.
In many cases, the relationship must be a two-way relationship. For example, if an application user selects Canada as
the Country, then the State dropdown filter must only contain the list of Canadian provinces instead of all states. When
the table gets updated, it must communicate back all the changes to the filters so that filters can show the correct
values. In this case, the table is the Producer and the filter is the Consumer. Note that in this example, the filters do
not communicate with each other the communication is between each filter and the table which displays the data.
Event hookups specify that something has changed; but do not indicate what has changed. The command (i.e. event
type) cannot be specified as part of event hookup. The producer is solely responsible for producing whatever kinds of
events it wants, whenever it wants. If a consumer is hooked-up to a producer, it will consume ALL of that producer's
events, and the consumer is solely responsible for deciding what action(s), if any, to take in response to each event
consumed.
In this section:
Event
Buttons
Page
Table
Record
UpdateData
C*
ResetData
FilterData
ExportData
C*
LogOut
Redirect
C*
C*
C*
GotoNext
All Filters
TableStats
Login
C
C
z Page 253
Event
Buttons
Page
Table
GotoPrevious
Search
DataChanged
AddRecord
DeleteRecord
C*
Custom
Record
All Filters
TableStats
Login
C
C
C*
Description
Custom
This event type is used for every event other than the predefined events described in
this table. This is useful for extending your application, using the generated
infrastructure.
AddRecord
DataChanged
This event is produced by filterable controls (e.g. Table Controls) so that filters (e.g.
CategoryFilters) can detect that the filterable control's data has changed and can
update their state (e.g. Category Path information). (There arent many legitimate
cases where a button would need to produce this type of event, except for scenarios
involving significant code extension.)
DeleteRecord
This event is used to delete a record in a table control or record control or to mark a
table control record for later deletion.
ExportData
This event exports a file containing data from a table control or record control.
FilterData
This event is produced by filters (e.g. CategoryFilters) when they are activated and
begin to modify their filterable controls (e.g. Table Controls).
LogOut
This event tells the page to sign out the signed in user.
Redirect
The event itself doesn't do anything, but the event's RedirectUrl, etc. will be used to
redirect if present.
z Page 254
Event
Description
ResetData
This event tells the consumer to refresh itself, effectively discarding any changes the
user may have made.
Search
This event activates filter, sort, and paging controls, which cause them to produce
FilterData events.
UpdateData
This event tells the consumer to save its data. In most cases, this means save to the
database and commit.
z Page 255
Each type of producer and consumer may support a different set of event commands and command
arguments.
Buttons can produce events with custom commands by specifying a custom value for the CommandName
property.
Some consumers could be modified using code customization to add/modify/remove support for all or some
event commands.
Some non-consumers could be modified using code customization to make them consumers.
Some non-producers could be modified using code customization to make them producers.
z Page 256
Setting
Button Text
Edit
Action
Redirect
None
Redirect URL
EditEmployeeRecord.aspx?Employees={0}
Redirect Parameters
ID
Step 3: Add an event hookup between the EditButtonBar and the Table. The event hookup is made at the page level.
Producer / consumer event hookups are typically
set at the page level, because the page is the
parent of the controls being hooked up.
The event producer is the V_Button control within the EditButtonBar. V_Button is a sub-control within the
EditButtonBar control. The event consumer is Table, the table control on the page.
z Page 257
258
z Page 259
z Page 260
z Page 261
z Page 262
Add any number of database-connected components to a page, including tables, records, fields, and filters.
You can create pages of any complexity and layout.
Change the look and feel of the generated components, including colors, fonts, layout and other stylistic
elements.
Create component and page templates that can be applied to any number of pages in your application.
Add custom application logic, including data validation and display code.
The Presentation Layer. Use design themes to change the functionality, look and feel of databound
components. Design themes provide the underlying look-and-feel for components generated by Iron Speed
Designer, including the colors, fonts, positioning, and other stylistic elements. Each design theme is
composed of a set of design theme files that provide the HTML for individual databound components, as well
as certain elements of your application's web pages. For example, the Add Record-Everest.html design theme
file contains the HTML required to generate an Add Record page in the Everest design theme, and the
Button.html design theme file contains the HTML to generate a button.
The Application Layer. Iron Speed Designer generates a straightforward class hierarchy that is fully
extensible. Your application is extended from the .NET Framework base classes in a hierarchy of five class
types: Page, Record, TableAccess, TableDefinition and SQLAccess. Each of these classes includes a "Safe"
class that is generated once and never rewritten and a "Generated" class that can be modified and updated
with each application regeneration.
You may wish to change your applications look the color scheme, fonts or you may wish to change the layout of
entire pages or the components generated by Iron Speed Designer on those pages tables, fields, etc. There are
several ways to change the stylistic and layout elements of web pages generated by Iron Speed Designer, depending
on what you are attempting to do.
z Page 263
Approach
Uses
Design Themes
Style sheets
ASPX pages
ASCX controls
Cosmetic and behavioral changes are made in a web page editor, such as
Microsoft Visual Studio .NET, one page at a time. Iron Speed Designer
generates ASPX pages and ASCX controls. Both of these can be changed
to give you the desired customized look and feel.
Note, however, that these pages and controls are completely generated
each time the application is built. So, you will want to save your changes in
a separate folder so you can reapply them to your application.
Best for: Any layout and style modification where it is acceptable that the
page be overwritten each time the application is built.
Not good for: Any modification where regenerating the application and
overwriting the modifications made to the page would cause difficulties.
z Page 264
Applications generated with Iron Speed Designer currently run on the Microsoft .NET web application platform. A
three-tier model is the favored model for the .NET environment, and is generally regarded as the most contemporary
web application architecture, both for internally facing and externally facing applications.
This section contains information about:
z Page 265
z Page 266
Moreover, using the safe classes, you can override any function of any base class. Typically you integrate by either
overriding one of the methods on the base class, or you write your own methods in combination with the existing base
class methods.
Please note that it is important to add your code extensions in the set of subclasses designated for application code
integration. If code modifications are made to the generated code, these modifications will be lost when the application
is built and the new user interface code overwrites the old code containing your modifications.
Code extensions can be written in any Microsoft Common Language Runtime (CLR) compatible language, including
Visual Basic .NET, C# and J#.
Safe Base Classes
The Base classes are typically where you add new functionality to your application, including additional business logic,
etc. Iron Speed Designer generates the Base classes only once and they are not overwritten each time the application
is built.
The base classes are described elsewhere in this Guide.
Generated Classes
Iron Speed Designer generates the Visual Basic code-behind classes of the ASPX pages and ASCX controls each
time you generate your application. Changes to these files will be overwritten, so you should not make any code
changes to these files directly. Typically, changes to these files are only required in special situations. If changes are
required to these files, you should make a copy of these files and re-apply the changes once the application is built.
A Visual Basic .NET project file (VBPROJ) incorporating all the source code files in your application.
z Page 267
A Web.config file with parameters adjusted for your application, including database and other server
connection parameters.
z Page 268
<Iron Speed Folder> is the folder name where you installed the Iron Speed Designer and the base classes.
<Application Folder> is the folder name specified by you where the source code for your application is
stored.
<Source> is the folder containing the applications source files needed by Iron Speed Designer to generate an
application.
<APP Name> is the application name specified by you when you first created the application. This name is
also used for the namespace and stored procedure name prefix and cannot be changed after creating the
application.
<Subfolder> is the name of a folder specified by you that contains the web pages and code-behind files
generated by Iron Speed Designer. You can create one or more subdirectories to organize your application
folder in a way that is most convenient to you.
<Table> is the name of an individual database table name or database view name.
<Web Page Name> is the name of an individual web page file name provided by you when the page was first
created through Iron Speed Designer.
The entire <Application Folder> folder can be copied to another server to deploy an application. The detailed process
of deploying an application is described separately.
...\<Application Folder>
This folder contains files necessary to ensure the application can run as a web application. Some of these files are
created directly by Iron Speed Designer; others are provided for your convenience.
For more detail, see:
z Page 269
Function
<APP Name>.vbproj
The Visual Basic .NET project that can be opened in Visual Studio
.NET.
Iron Speed Designer does not create a .SLN file (solution file),
because Visual Studio .NET automatically creates one if you open
any VBPROJ file.
<APP Name>.vbproj.webinfo
Used by Visual Studio .NET to help Visual Studio .NET integrate with
the Microsoft IIS web server while working with web applications in
Visual Studio .NET.
<APP Name>.vsdisco
CompileApplication.bat
CompileApplication.rsp
This batch file compiles your applications source code into a DLL
assembly using the .NET Framework SDKs Visual Basic compiler or
Microsoft Visual Studio .NET. CompileApplication.rsp contains the
compilation options used by the compiler.
If you have Visual Studio .NET installed, this batch file tries to
compile with it first. If that fails, the VBC compiler supplied with .NET
Framework is used.
Default.aspx
IronSpeedWebForm.js
z Page 270
File
Function
IronSpeedWebUIValidation.js
Web.config
Function
AssemblyInfo.vb
z Page 271
File
Function
Global.asax
The Global.asax file, also known as the ASP.NET application file, is an optional
file that contains code for responding to application-level events raised by
ASP.NET or by HTTP modules. The Global.asax file resides in the root folder of
an ASP.NET-based application. At run time, Global.asax is parsed and compiled
into a dynamically generated .NET Framework class derived from the
HttpApplication base class. Files with .asax extensions cannot be directly
requested through IIS server; external users cannot download or view the code
written within it.
Global.asax.vb
The Visual Basic code-behind for Global.asax. This code-behind object inherits
from the Global class in the Iron Speed base classes. This code-behind is
created for your convenience when extending the application by adding your own
code.
Global.asax.resx
The resource file for Global.asax. These are often created by Visual Studio .NET
automatically. Iron Speed Designer does not currently use this file.
...\<Application Folder>\bin
This folder contains the .NET assembly for your application as well as the Iron Speed base class assembly (DLL) and
PDB files.
Adding, deleting or changing any file in this folder will cause IIS to restart the application.
File
Function
<APP Name>.dll
BaseClasses.dll
The Iron Speed base classes in compiled, library form. This is the only
base classes file you will need to run your application. The base classes
source code is not needed when deploying applications.
z Page 272
File
Function
BaseClasses.<LOCALE>.resx
...\<Application Folder>\DataAccess
This folder contains the generated source code files to access the database. A set of files is generated for each table
and each joined table. Iron Speed Designer creates Visual Basic object classes for your database, one Record class
and one TableAccess class for each table. All access to the database table goes through these classes regardless of
which web page uses the data.
Each Record and TableAccess class has a corresponding safe class. The safe classes are generated only once and it
is safe to include custom application logic within them without fear of them being overwritten.
File Type
Function
The Record class corresponds to a record in the database and implements logic
to get data from the object and set data into the object.
A safe class is also generated for the Record class. Since this class is
generated only once, it is safe to include custom application logic within the class
without fear of it being overwritten.
The safe class is called <Table>Record and is created in a file called
<Table>Record.safe.vb.
The generated class is called <Table>RecordGen and is created in a file called
<Table>Record.gen.vb.
z Page 273
File Type
Function
The Table Access class implements logic to retrieve a set of records based on a
filter. The developer can specify the filtering criteria or the application user can
specify the criteria through user selectable controls.
A safe class is also generated for the Table Access class. Since this class is
generated only once, it is safe to include custom application logic within the class
without fear of it being overwritten.
The safe class is called <Table>Access and is created in a file called
<Table>Access.safe.vb.
The generated class is called <Table>AccessGen and is created in a file called
<Table>Access.gen.vb.
The SQL interface class contains the access code to retrieve data from and save
data to the database through the generated stored procedures.
The generated class is called <Table>SqlAccessGen and is created in a file
called <Table>SqlAccess.gen.vb.
There is no safe class created for this class as it does not typically need to be
modified.
This class is only generated for tables and views, but not for table joins.
z Page 274
Description
<TABLE>Record.gen.vb
<TABLE>Record.safe.vb
<TABLE>Access.gen.vb
<TABLE>Access.safe.vb
<TABLE>Definition.vb
<TABLE>SqlAccess.gen.vb
z Page 275
...\<Application Folder>\Images
This folder contains image files that are used by your application at run time, including the image files used by the web
pages, the application logo file, and the style sheets.
You can place any image files in this folder and refer to them in your application by using a relative URL such as
../Images/<Image Name>.
The Images folder may contain sub-directories for different design themes if you have created new layout pages using
page templates.
...\<Application Folder>\<Subfolder>
This folder contains the generated source code files associated with one or more web pages created by you. You
specify the name of the folder when you create the web page in Iron Speed Designer. The folder contains the web
page and its related files.
Each web page is comprised of a set of files: one ASPX file, zero or more ASCX (controls) files and .VB files
containing the Visual Basic code-behind source code. The code-behind source code is generated as a pair of files a
file containing a safe class and the base class used to derive the safe class. Once generated, the safe class is never
overwritten.
Page Type
Function
This contains the HTML and ASP.NET code for the web page displayed
and the web controls for validating individual controls on the web page.
This contains the HTML and ASP.NET code for user controls used by the
page.
Code-behind classes
(.gen.aspx.vb, .gen.ascx.vb)
Contains fields, properties and event logic for the controls within the page
or user controls.
z Page 276
...\<Application Folder>\OtherComponents
When you use a design theme to create an application, a number of the components of the design theme are
generated as user controls and used by multiple pages. For example, a Button user control is created in the
Button.ascx file and is used by the web pages created by you.
Each user control has a set of three files: an ASCX file and two Visual Basic code-behind files. The ASCX contains
the control and the Visual Basic files contain the generated and safe classes for the control.
The generated code-behind class is called <Control>Gen and is created in the <Control>.gen.ascx.vb.
The safe code-behind class is called <Control> and is created in the <Control>.safe.ascx.vb.
Control
Function
Button
Footer
Header
Menu
Menu_Item
z Page 277
Control
Function
Menu_Item_Highlighted
The default highlighted menu item control used by the web pages.
Pagination
Range_Filter
Search
...\<Application Folder>\OtherPages
This folder is used to store some standard log in and error pages needed by every application and the generated
ASCX controls after generating an application. These pages are generated automatically for every application and can
be changed or extended by customizing the safe code-behind files.
File
Function
Forbidden.aspx
Internal_Server_Error.html
Show_Error.aspx
SignIn.aspx
SignedOut_Confirmation.aspx
...\<Application Folder>\Source
The Source subfolder under the <Application Folder> contains source files used by Iron Speed Designer to create,
modify and generate an application. The Source folder contains a set of subdirectories that mirror the directories in the
z Page 278
<Application Folder>. This folder is not required to run an application and can be excluded when copying the
<Application Folder> to deploy an application.
Any changes made in this folder are applied to the application the next time it is generated.
Files created by Iron Speed Designer
File
Function
AppInfo.xml
This file is created by Iron Speed Designer and contains information about the
application, including its name, and application description.
<APP NAME>.config
This file is used internally by Iron Speed Designer and should not be modified.
Web.config
The applications configuration file used by .NET and by the application. This file is
copied to:
\<Application Folder>
each time your application is generated. You should make most of your
configuration changes to the Web.config file in the Sources folder.
This file contains a variety of settings used by the application. The application
settings and their values are described elsewhere in this Guide. The .NET settings
are described in the Microsoft .NET Framework documentation.
Because the Web.config file is in XML format any changes should be made
carefully, being mindful to change only values and not the XML syntax. Any error in
the file will cause the file to fail to load.
Files with .config extensions cannot be directly requested through the Microsoft IIS
server; external users cannot download or view the code written within it.
Modifying this file will cause Microsoft IIS to restart your application.
...\<Application Folder>\Source\Bin
In general, the files in this folder are copied to
\<Application Folder>\bin
when your application is generated by Iron Speed Designer where they can be used at application run-time.
z Page 279
File
Function
Your applications string resource file. The resource file(s) contain the
localized versions of the various error and information messages.
Example:
Acme.en-US.resx
Acme.es-PA.resx
...\<Application Folder>\Source\DataAccess
This folder contains the Table Binding Files (TBF) that contain information about the database schema and other
information used by Iron Speed Designer. There is one file for every table used by the application.
File
Function
<TABLE>.xml
This file is used by Iron Speed Designer to specify the database schema for the
designated table.
<TABLE> is the name of the database table.
Example: Orders.xml
...\<Application Folder>\Source\Images
This folder serves as a temporary folder for image files needed by the application. When you select a new Design
Theme, the new image files are first copied to this folder from the Iron Speed Designers source folder. When you
build the application, these image files are then copied to the <Application Folder>/Images folder.
This folder may contain sub-directories for each of the design themes used by your application. Each sub folder
contains the design theme specific images.
...\<Application Folder>\Source\OtherComponents
This folder contains layout and properties files used when creating an application. Iron Speed Designer uses layout
pages and properties files during the generation process to create ASPX, ASCX and VB files.
...\<Application Folder>\Source\OtherPages
This folder contains the properties files needed to generate error pages by every application.
z Page 280
...\<Application Folder>\Source\<Subfolder>
This folder contains the layout pages and properties files used by Iron Speed Designer to generate the source code
files for your application. The folder name corresponds to the name you specified when creating a web page.
Each web page is based on an HTML layout page file and a properties file. The subfolder contains this pair of files for
each web page you created.
File Name
Description
The HTML layout page file containing code generation tags for the web
page.
The Properties file for the web page containing the properties for each
of the code generation tags in the layout page file.
...\<Application Folder>\Source\Styles
This folder contains the Styles.css files for your application. There may be a Styles file for each of the design themes
used by your application. These Styles files will be copied to the Styles director within the Application Folder during
the next generation.
File Name
Description
Styles-<Design Theme>.css
...\<Application Folder>\StoredProcedures
The StoredProcedures sub-folder contains the latest deployed version of database stored procedure code for each of
the database tables used by the application. The stored procedures are described elsewhere in this Guide. Changes
to the stored procedures will be overwritten when the application is built.
The stored procedures are only generated by Iron Speed Designer Enterprise Edition. The Professional Edition
accesses the database directly through the database layer defined in the Base Classes.
File
Function
p<APP Name><Table>Add.sql
p<APP Name><Table>Delete.sql
p<APP Name><Table>DeleteRecords.sql
p<APP Name><Table>DrillDown.sql
p<APP Name><Table>Export.sql
z Page 281
File
Function
p<APP Name><Table>Get.sql
p<APP Name><Table>GetList.sql
p<APP Name><Table>GetStats.sql
p<APP Name><Table>Update.sql
LoadStoredProcedures.exe
pOMSEmployeesDelete.sql
...\<Application Folder>\Styles
This folder contains the Styles.css files for your application. There may be a Styles file for each of the design themes
used by your application.
File Name
Description
Styles-<Design Theme>.css
The Styles file used for your application. This style sheet file can be
customized to change the look and feel of the application. This file is
used at run time by the application when displaying the ASPX pages
and ASCX controls.
There are some styles within this file that are used by Iron Speed
Designer when generating applications. These are described in the
Design Themes section elsewhere in this Guide.
z Page 282
Iron Speed Folder is the folder name where you installed Iron Speed Designer and the base classes.
Function
Designer.config
This is the default Web.config file provided for Iron Speed Designer. The installation
program copies the correct Web.config file for your environment. If you need to change
the Web.config files, you can copy one of the files listed below.
z Page 283
An application is created. Iron Speed Designer creates the two new .resx string resource files by copying the
closest files for the closest culture. For instance, if you chose es-PE, Iron Speed Designer creates new .resx
files from the *.es.resx files.
An application is imported from one system to another. Iron Speed Designer looks at each of the application's
.resx files and copies any that are not already on the system.
File
Function
BaseClasses.<UICULTURE>.resx
This string resource file contains the validation and error messages used
by the Iron Speed base classes. When an application is first created
(initialized), this file is copied into your applications Source\Bin folder.
There is one resource file for each UI culture.
ProjectTemplate.<UICULTURE>.resx
This string resource file contains application validation and error messages.
When an application is first created (initialized), this file is copied into your
applications Source\Bin folder. There is one resource file for each UI
culture.
Description
A page template to create Add Record pages. The Add Record page can also add
records in detail tables using a master-detail relationship.
A page template to create Edit Record pages. The Edit Record page can also edit
records in detail tables using a master-detail relationship.
Other Pages
z Page 284
Description
A page template to create Show Record pages. The Show Record page can also
show records in detail tables using a master-detail relationship.
Function
AssemblyInfo.vb
Global.asax.vb
The Visual Basic code-behind for Global.asax. This code-behind object inherits from
System.Web.HttpApplication class. These classes and code-behinds are created for
your convenience when extending the application with your own code.
IronSpeedBase.sln
Contains the Visual Studio .NET solution file used to build the DLL for Iron Speed base
classes. The solution file also uses files with the extensions of .vbproj, .vbproj.user,
.vbproj.vspscc and .vsdisco.
z Page 285
Function
BaseClasses.dll
The Iron Speed base classes in compiled, library form. This is the only base class file you
will need to run your application. The base class source code is not needed when
deploying applications. Once compiled, you can copy this file to the
\ProjectTemplate\Bin folder so that all new applications created will use the latest
version.
BaseClasses.pdb
A PDB (program database) file holds debugging and project state information that allows
incremental linking of a Debug configuration of your application. This allows you to debug
BaseClasses.dll.
Function
ApplicationSettings.vb
This file contains classes and functions that retrieve information from the
Web.config file.
DatabaseConnection.vb
z Page 286
z Page 287
File
Function
ArrayUtils.vb
DelimitedDecoder.vb
FileUtils.vb
MailSender.vb
MiscUtils.vb
Miscellaneous utility functions for serializing objects and interacting with log
files.
NetUtils.vb
Utility functions for testing and managing URL parameters, similar to those
found in the System.Net namespace.
SessionConst.vb
StringUtils.vb
SystemUtils.vb
z Page 288
Function
IronSpeedWebForm.js
Contains JavaScript utility functions used by the Iron Speed base classes.
IronSpeedWebUIValidation.js
Web.config
This is the default Web.config file provided for the generation applications.
The installation program copies the correct Web.config file for your
environment.
z Page 289
Browser Compatibility
"ASP" is the tag prefix for the standard .NET web controls used in the generated ASPX pages.
"BaseClasses" is the tag prefix associated with the .NET custom controls defined in the Iron Speed base
classes.
The applications name is used as the tag prefix for the applications own generated .NET user controls (i.e.
the ASCX controls). These tag prefixes are defined in each ASPX / ASCX file using the "<@Register ... >"
statements near the top of the files.
Example
z Page 290
Browser compatibility. DHTML relies heavily on client-side scripting and DHTML frequently introduces
browser compatibility problems. The .NET component model used by Iron Speed Designer does not have
these browser restrictions.
Complex dependencies. Every type of request made by a page needs to be supported by a web service or a
helper page. This means that pages are not self-contained entities, and DHTML can lead to complicated runtime dependencies.
z Page 291
Component model programming is the preferred .NET architecture. Pages generated by Iron Speed
Designer use a component model, where the components are given complete control over certain sections of
the HTTP response. In order for an application to function properly, the page needs to get new data from the
server, parse that data, and use it to modify the page. That requires that either: (a) the page itself has
complete knowledge of the page's content in order to update it properly, or (b) the server-side component
model be replicated on the client side. The former is not possible using a component model, and the latter
would require extensive DHTML use (see #1).
Customization is difficult. One of the features of the Iron Speed component model is that it is customizable.
You can override or extend the server-side functionality of the application pages and components. These
customizations may include code that cannot be performed on the client side for technical, security, or other
reasons.
Security risks. Placing application logic in client-side scripting frequently introduces security risks into your
application.
Page Flashing
One advantage to using DHTML is its ability to eliminate the page flashing caused when an application goes back to
the server to fetch and display new data. Whenever a page needs to be updated using new data from the server, the
current document is replaced using an HTTP Get (i.e. redirect) or HTTP Post (i.e. form submit) operation, which can
cause page flashing.
Applications generated by Iron Speed Designer are designed to require as little DHTML support as possible, and to
utilize limited DHTML in certain situations if the browser requesting the page supports it. However, the customizable
aspect of Iron Speed Designer applications means that you can extend the application (or the Iron Speed base
classes) to use existing technology. Depending on how your application works, you can avoid some, or even all, page
flashing. Using JavaScript, IFrames or Layers, etc., it is possible to download web content from a server, and use that
content to dynamically modify or update the current page's content, without page flashing.
Using Frames and IFrames in any .NET page complicates post-backs because each Frame's document
contains a separate HTML Form.
Inter-frame interaction is possible on the client side using Javascript, but the .NET convention, which Iron
Speed Designer follows, is to use server side code whenever possible.
z Page 292
Frame Requests are processed individually, often sequentially (but possibly simultaneously), and in
possibly arbitrary order.
Because of these limitations, using Frames and IFrames can affect the server side session history mechanism
and cause buttons which redirect "Back" to behave in an undesired manner.
A Request from a given Frame can only affect another Frame by emitting Javascript within its own Response
to effect client side interaction, and / or by server side caching (assuming the affected Request is processed
after the affecting Request) and special code within both pages.
Browser Compatibility
.NET is partially compatible with older browsers. .NET does require a minimal level of JavaScript support, and it will
attempt to adjust the HTML returned to the client based on the client's browser's capabilities. However, for browsers
other than Microsoft Internet Explorer, .NET may adjust content by disabling or ignoring certain features. For example,
client-side validation only works with Internet Explorer; other browsers only get server-side validation.
Moreover, the rendered pages may not look good because certain older browsers have inconsistent and incomplete
support for standard HTML, CSS, and JavaScript. This is especially true with Netscape 4.0, which, for example,
supports approximately 30% of the CSS1 specification. So it is possible that an application might function normally in
terms of navigation, user input, etc. on an older browser, but it would probably not look good.
z Page 293
This technique, called in-memory paging, is impractical for most applications. Repeaters also have no built in support
for paging, sorting, and filtering.
Every Register directive within an ASPX/ASCX page has a TagName that is unique from all other Register
directives within that ASPX/ASCX page.
Every Register directive within an ASPX/ASCX page has a Src that is unique from all other Register directives
within that ASPX/ASCX page, although it is not mandatory.
Exactly zero or one Register directives per distinct ASCX page are generated within any given ASPX/ASCX
page.
The Register directive for an ASCX page precedes all uses of that TagName in the same ASPX/ASCX page.
All pages created by Iron Speed Designer have page properties that correspond to these page sections, and their
contents can be specified programmatically from the page's safe class.
HTML Tag
<HEAD>
Head1
<HTML>
Html1
z Page 294
HTML Tag
<BODY>
Body1
<FORM>
Form1
Procedure
For example, here's how to add such a tag to an application's OtherPages\MyPage.aspx:
Step 1: Locate and open the pages safe class, e.g.:
\<APP NAME>\OtherPages\MyPage.safe.aspx.vb
Step 2: Add code to the page's Load handler that creates a Literal control. Then, specify the text to be included in the
header or other section and add the new Literal control to the page's Head1 object.
Private Sub MyPage_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Tell the page to add a "refresh" header element
' define a new Literal control to contain the text of the header element
Dim refreshLiteral As New Literal
' set the control's text to the desired value
refreshLiteral.Text = "<meta HTTP-EQUIV=""Refresh"" CONTENT=""120"">"
' add the control to the page's "Head1" object
Me.Head1.Controls.Add(refreshLiteral)
End Sub
Step 3: Build and run the application. The specified text will now appear in the page's HEAD container, and the page
will refresh automatically every 120 seconds.
z Page 295
>
</BaseClasses:TAGNAME>
Common Elements
There are several elements common to all generated presentation layer tags.
Attribute
Description
Id
Runat
CSSClass
z Page 296
Attribute
Description
Text
CommandName
Font-Names
Font-Size
Example
<BaseClasses:Button
id="FirstPageButton"
runat="server"
Text="|< First Page"
CommandName="Search"
Font-Names="Verdana"
Font-Size="X-Small">
</BaseClasses:Button>
Description
LoginRequired
Role names that can access the page. When a user tries to access this page, these role
names are compared against the roles possessed by the application user. If a single
match is found, the user is allowed access to this page.
Example
<BaseClasses:BasePageSettings
id="PageSettings"
runat="server"
LoginRequired="Abraham;Charlene;Cheryl">
</BaseClasses:BasePageSettings>
z Page 297
Attribute
Description
PathContainerName
The name of the web control that the dynamically created category
path display control will be added to. Optional.
Fields
FilterKey
A string that will be used to create a filter hash key. Multiple controls
with the same parent and FilterKey will all share the same filter object.
SubcategoryContainerName
The name of the web control that the dynamically created subcategory
display control will be added to. Optional.
SubcategoryContainerLabelName
The name of the Label web control that will display the name of the
current subcategory column. Optional.
MaxSubcategoryValues
FirstSubcategoryValueText
The text of the first subcategory control item. The first item represents
"No Selection".
Example
<BaseClasses:CategoryFilterControl id="CFC1" runat="server"
Fields="c3,c1,c2"
FilterKey="CFC1"
PathContainerName="CFC1PathContainer"
FirstPathValueText="<b>All</b>"
PathValueSeparatorTemplate=" ~> "
SubcategoryContainerName="CFC1SubcategoryContainer"
FirstSubcategoryValueText="<i>Please Select</i>"
MaxSubcategoryValues="2"
SubcategoryContainerLabelName="CFC1SubcategoryContainerLabel"
>
</BaseClasses:CategoryFilterControl>
z Page 298
Attribute
Description
ErrorMessage
ControlToValidate
ControlToCompare
Font-Size
Font-Names
Example
<BaseClasses:CompareValidator
id="VerifyNewPasswordCompareValidator
runat="server
ErrorMessage="Passwords don't match. Please re-enter your new password again."
Display="None
ControlToValidate="VerifyNewPasswordTextbox
ControlToCompare="NewPasswordTextbox
Font-Size="11px
Font-Names="verdana, arial">
</BaseClasses:CompareValidator>
Description
ClientValidationFunction
Example
<BaseClasses:CustomValidator
ID="ImportValidator
Display="Dynamic
RunAt="Server
ClientValidationFunction="validate>
</BaseClasses:CustomValidator>
z Page 299
Attribute
Description
Field
Operator
TimeString
The time string (min value or max value) with which to compare
DisplayControl
The control whose value is the date to be used in the filtering operation.
Example
<BaseClasses:DateFieldValueFilterControl
id="DateFieldValueFilterControl1a
runat="server
Field="create_date
Operator=">=
TimeString="00:00:00
DisplayControl="DateFieldValueFilterControl1aTextBox">
</BaseClasses:DateFieldValueFilterControl>
Description
AutoPostBack
Boolean value (true/false) used inside a control to cause the page to post back when the
control is changed. This is very useful with drop down lists and list boxes. AutoPostBack is
the equivalent of a normal form submission but it must be noted AutoPostBack is a "global"
submit. All processes of the form submission will be run as if you click the Submit button.
style
Example
<BaseClasses:DropDownList
id="FieldValueFilterControl1DropDownList
runat="server
AutoPostBack="True
style="vertical-align:middle">
</BaseClasses:DropDownList>
z Page 300
Description
Text
Example
<BaseClasses:FieldNameLabel
id="V_FOREACHRecord1Label
runat="server
CssClass="field_label
Text="ReadOnlyIdentity:">
</BaseClasses:FieldNameLabel>
Description
Field
Field name or position of the database column associated with this field.
Example
BaseClasses:FieldValueTextBox
id="V_FOREACHRecord3Value"
runat="server
CssClass="field_input
Field="2">
</BaseClasses:FieldValueTextBox>
Description
ControlToValidate
ErrorMessage
Example
<BaseClasses:FieldValueValidator
z Page 301
id="V_FOREACHRecord1ValueFieldValueValidator
runat="server
ControlToValidate="V_FOREACHRecord1Value
ErrorMessage="Invalid value for au_id.">
</BaseClasses:FieldValueValidator>
Description
Table
Field
Field name or position number of the database table field on which to sort.
FieldSortControl
Example
<BaseClasses:FieldSortControl
id="V_FOREACHHeaderRow2FieldSort"
runat="server
Table="authors
Field="1
FieldSortControl="V_FOREACHHeaderRow2FieldSortButton">
</BaseClasses:FieldSortControl>
Description
NavigateUrl
Example
<BaseClasses:HyperLink
id="Hyperlink1
runat="server
NavigateUrl="/App/">
HyperLink1
</BaseClasses:HyperLink>
z Page 302
Description
ToolTip
The tool tip text displayed when the user mouses over the image button.
CommandName
RedirectUrl
CausesValidation
Consumers
ImageUrl
True
Validation is performed.
False
parent:table
Specifies the relative path in the file system of the image file.
Example
<BaseClasses:ImageButton
id="V_EditIcon
runat="server
CssClass="button_image
ToolTip="Edit Record
CommandName="Redirect
RedirectUrl="/20001/Custom/authors/Edit_authors_Page.aspx?authors=$ID
CausesValidation="True
Consumers="parent:record
ImageUrl="/20001/Theme/icon_edit.gif">
</BaseClasses:ImageButton>
z Page 303
Attribute
Description
ImageUrl
Specifies the relative path in the file system of the image file.
Example
<BaseClasses:Image
id="V_DialogIcon"
runat="server
CssClass="image
ImageUrl="/20001/Theme/icon_edit.gif">
</BaseClasses:Image>
Description
Text
CausesValidation
CommandName
Example
<BaseClasses:LinkButton
id="ForgotPassword"
runat="server"
Text="click here"
CausesValidation="false"
CommandName="SendPassword">
click here.
z Page 304
</BaseClasses:LinkButton>
Description
NavigateUrl
Text
Roles
style
Font-Names
Font-Size
ForeColor
Font-Bold
True
False
Example
<BaseClasses:MenuLink
id=TabSignIn
runat=server
NavigateUrl=<%# bcSystem.GenerateURL(Login, Login.aspx, ) %>
Text=Sign In
Roles=Administrator;Customer Service
style=TEXT-DECORATION: none
Font-Names=verdana,arial,sans-serif
Font-Size=8pt
ForeColor=White
Font-Bold=True>
</BaseClasses:MenuLink>
z Page 305
Attribute
Description
ControlToValidate
MaxDecimalPlaces
MinValue
MaxValue
ErrorMessage
Example
<BaseClasses:NumberValidator
id=V_PageSizeTextBoxNumberValidator
runat=server
ControlToValidate=V_PageSizeTextBox
MaxDecimalPlaces=0
MinValue=1
ErrorMessage=Page size must be a positive integer.>
</BaseClasses:NumberValidator>
Description
ControlToValidate
ErrorMessage
Error message to display if the password input does not meet the minimum formatting
standards.
Example
<BaseClasses:PasswordValidator
id=NewPasswordValidator
runat=server
ErrorMessage=Password must contain at least 6 characters.
ControlToValidate=NewPasswordTextbox>
</BaseClasses:PasswordValidator>
z Page 306
Description
True
False
Example
<BaseClasses:Panel
id=PreviousButtonPanel
runat=server
Visible=<%# (Not(IsNothing(Me.PreviousButtonPanel))) AndAlso
(Platform.BaseWorkflow.CanGotoState(Me.getRecord(False), Me.bcSystem,
Platform.BaseWorkflow.WorkflowState.STATE_PREVIOUS)) %>>
<td>
</td>
<td>
<img src=../../Theme/space.gif height=6 width=3 alt=>
</td>
</BaseClasses:Panel>
Description
FirstPageControl
PreviousPageControl
CurrentPageControl
NextPageControl
LastPageControl
Example
<BaseClasses:PagingControl
id=V_FirstFilter
z Page 307
runat=server
FirstPageControl=V_FirstButton:V_Button>
</BaseClasses:PagingControl>
Description
GroupName
Example
<BaseClasses:RadioButton
id=RB1
runat=server
GroupName=Group1>
</BaseClasses:RadioButton>
Description
ControlToValidate
ErrorMessage
Example
<BaseClasses:RequiredFieldValidator
id=V_FOREACHRecord1ValueRequiredFieldValidator
runat=server
ControlToValidate=V_FOREACHRecord1Value
z Page 308
Description
ControlToValidate
ErrorMessage
Example
<BaseClasses:RecordControlCustomValidator
id=V_FOREACHRecord1ValueRecordControlCustomValidator
runat=server
ControlToValidate=V_FOREACHRecord1Value
ErrorMessage=Invalid value for au_id.>
</BaseClasses:RecordControlCustomValidator>
Description
True
Validation is performed.
False
CommandName
RedirectUrl
ImageURL
Example
<BaseClasses:RecordControlImageButton
id=ViewRecordButton
runat=server
CausesValidation=False
CommandName=Redirect
RedirectUrl=ShowRecord.aspx?ID=$ID
z Page 309
ImageURL=http://localhost/20000/app/common/images/VD.gif>
</BaseClasses:RecordControlImageButton>
Description
ControlToValidate
ErrorMessage
Error message displayed if the input text does not match date format.
Example
<BaseClasses:ShortDateValidator
id=DateFieldValueFilterControl1aTextBoxValidator
runat=server
ControlToValidate=DateFieldValueFilterControl1aTextBox
ErrorMessage=Must be a valid date in MM/DD/YY format.>
</BaseClasses:ShortDateValidator>
Description
TextControl
Example
<BaseClasses:SearchTextControl
id=V_SearchArea
runat=server
TextControl=V_SearchAreaTextBox">
</BaseClasses:SearchTextControl>
Description
GroupName
z Page 310
Example
<BaseClasses:TableControlRadioButton
id="V_Select
runat="server
GroupName="SelectedRecord">
</BaseClasses:TableControlRadioButton>
Description
DataSource
Example
<BaseClasses:TableControlRepeater
id="R_TableBody"
runat="server
DataSource="<%# Me.getRecords() %>">
<ItemTemplate>
<Test1:TableBody
id="V_TableBody"
runat="server
ParentIdField="<%# Me.ParentIdField %>
ParentIdFieldOfContainer="<%#
CType(Nothing, String) %>">
</Test1:TableBody>
</ItemTemplate>
</BaseClasses:TableControlRepeater>
z Page 311
Attribute
Description
TextMode
For the password text box, the * (asterisk) character is echoed for
each typed character.
Example
<BaseClasses:TextBox
id="Password
class="field_input
runat="server
TextMode="Password">
</BaseClasses:TextBox>
Description
ControlToValidate
ErrorMessage
Text message displayed if the input length is greater than the maximum permitted
length.
Example
<BaseClasses:TextBoxMaxLengthValidator
id="V_FOREACHRecord1ValueTextBoxMaxLengthValidator
runat="server
ControlToValidate="V_FOREACHRecord1Value
ErrorMessage="Value for stor_id is too long.">
</BaseClasses:TextBoxMaxLengthValidator>
z Page 312
z Page 313
Text area
When capture zones are nested, only the innermost zone is activated.
These page template files contain the following capture zones:
Show Table pages have a capture zone around their data that is associated with the Show Table page's first
button.
Add Record, Edit Record, and Show Record areas have capture zones around their fields that are associated
with the Record's first button (Save or Cancel).
Show Table page filters activate the Show Table page's Filter button.
Dialog Pages have a capture zone around their contents, which is associated with the Dialog Page's first
button, e.g. the OK button for the Sign In page.
The capture zone tags are .NET script tags that are ignored by Iron Speed Designer itself. At run time, these tags call
code in the Iron Speed base classes to generate the DHTML for the capture zones. Iron Speed Designer provides you
with a capability to handle the pressing of the Enter key by the application user on any control or the entire page. You
can designate the specific button that will receive an event when the enter key is pressed for a control. This control is
provided by enclosing the control with a Begin Capture and End Capture block as shown in the example below for the
Show Table page's Search text box and the capture zone around it from the Everest design theme:
<%= Me.SystemUtils.GenerateEnterKeyCaptureBeginTag(Me.FindControl("V_SearchButton")) %>
<GEN:SearchFilter name="SearchArea" />
<%= Me.SystemUtils.GenerateEnterKeyCaptureEndTag(Me.FindControl("V_SearchButton")) %></td>
<td><GEN:Button name="SearchButton" file="../OtherComponents/Button-Vanilla.html" /></td>
In the above example, the SearchFilter code generation tag results in a text box that is displayed to let the application
user type some search text. To begin the search process, the application user can press the search button using a
mouse. Alternatively, the application user can simply press Enter. To let applications pass the Enter Key event, you
can surround the search filter text box within a Begin and End capture block.
You can specify the control that will receive the event when the enter key is pressed as a parameter to the function. In
the example given below, the Me.FindControl function is first used to find the search button on this page. The Button
z Page 314
code generation tag defines a button with the name of SearchButton. Iron Speed Designer automatically prefixes the
name of each tag with a V_ so as not to conflict with any existing names. The begin capture function
GenerateEnterKeyCaptureBeginTag can be called to designate the beginning of the capture block.
<%= Me.SystemUtils.GenerateEnterKeyCaptureBeginTag(Me.FindControl("V_SearchButton")) %>
To end the capture block, call the GenerateEnterKeyCaptureEndTag function using very similar syntax shown above.
<%= Me.SystemUtils.GenerateEnterKeyCaptureEndTag(Me.FindControl("V_SearchButton")) %></td>
Note that the SearchButton referred to by the capture block must exist within the same page, but is not required to be
within the capture block.
z Page 315
Record. A class corresponding to a record is generated for each database table used in your application to
perform record-based access (e.g., insert, update, delete).
Table Access. A class is generated for each table in your application to provide the methods necessary to
retrieve a group of records based on your filtering criteria and end-user filtering criteria.
Virtual Record. A class corresponding to a record is generated for each database table or database view that
is joined together.
Virtual Table Access. The Virtual Table Access class provides the methods necessary to retrieve a group of
records based on your filtering criteria and end-user filtering criteria. A subclass of the Virtual Table Access
class is created for each table join you specify.
Each individual class is generated as a related pair of objects: a Safe class that is generated once and never
overwritten, and a Generated class that will be re-generated (re-written) whenever you modify the page or record.
The safe classes are derived from the generated classes and are always the lowest level classes so you can override
any of the generated classes or the Iron Speed base classes. By adding your application-specific code to the safe
classes, you are free to extend or replace functionality without worrying about your extensions being overwritten by
subsequent regenerations.
The file names containing the generated and safe classes contain a .gen and .safe suffix in their names.
This section contains information about:
Page Classes
Record Classes
z Page 316
Page Classes
The generated class for each page created by Iron Speed Designer is derived from the BasePage class in the Iron
Speed base classes. A class is first derived from the BasePage class, and a second, safe class is further derived from
the generated class. The safe class will never be overwritten when the application is built. The safe class is a stub
that allows you to extend the application without fear of your code being overwritten.
Use Page classes to modify the components and
other visual aspects of your generated web
application.
<PAGE>Gen Class
<PAGE> Class
<PAGE>Gen Class
The name of the generated class is derived from concatenating the name of the page with the suffix Gen. For
example, a page named ShowCustomer will have a code-behind class called ShowCustomerGen.
The following methods are implemented for the generated class:
Method
Description
New
Calls the New method of the parent class. Typically, this is the method you can
override in the safe class to add additional business logic prior to the initialization of the
page.
Page_Init
Calls the InitializeComponent method of the class. This method is required by the Web
Form Designer and should not be modified.
z Page 317
Method
Description
Page_Load
The Page_Load method is called in response to the page Load event each time a
page is loaded. The binding of the data to their controls is initiated by this method.
In addition to the methods, the generated class file registers event handlers for each of the controls on the page. It
also defines properties and methods to provide easy access to the controls.
Example: A variable and public property is defined to access the control.
Protected WithEvents V_AuthorLastName As IronSpeed.Base.Web.UI.WebControls.FieldValueTextBox
Public ReadOnly Property P_AuthorLastName() As IronSpeed.Base.Web.UI.WebControls.FieldValueTextBox
Get
Return Me.V_AuthorLastName
End Get
End Property
Server control tags contained inside of a templated server control's start and end tags (e.g. inside of an
<ItemTemplate> or a Repeater control) declared in the same ASPX/ASCX.
FieldValue tags that are anywhere inside of an ItemTemplate tag won't have code-behind declarations. If you want
FieldValues within a table controls rows to have code-behind declarations, then place the FieldValue tags in a panel
and then include the panel via a USE code generation tag within the tables ItemTemplate. This ensures that the
FieldValues and ItemTemplate are not in the same ASPX/ASCX.
<PAGE> Class
The safe class for a page is derived from the generated class.
The safe class is only generated once when the page is created and will never be overwritten by Iron Speed Designer.
The name of the safe class is the same as the name of the page. For example, a page named ShowCustomer will
have a safe code-behind class called ShowCustomer. Since the name of the page is used as the name of the class,
all page names must be unique in the application regardless of where they are located.
The default safe class created by Iron Speed Designer does not override any methods nor introduces any fields or
variables.
z Page 318
Typical customizations that may be done in this class include the addition of custom event handlers and the overriding
of base class methods. The methods of Page are documented in the Microsoft .NET documentation available from
Microsoft and the BasePage methods are documented elsewhere in this Guide.
The generated and safe classes are generated in the namespace provided by you when you created the application.
Record Classes
A record in a database table is represented in the application as a class. For example, if your application has a table
containing a list of customers, Iron Speed Designer will create a class for the Customer record. This class is derived
from the PhysicalRecord class and contains methods enabling the application to access and set specific fields within
the record. The primary reason for generating a class, instead of using PhysicalRecord itself, is to create a set of
methods that are specific to the record. For example, instead of the application using a function called GetFieldValue,
the application can use GetFirstName. This makes the application more understandable and easier to maintain.
Iron Speed Designer creates an additional sub-class called the safe class where you can add business logic without
worrying about the files being overwritten.
Use the Record classes to modify the data
access logic aspects of your application.
The name of the generated class is derived from concatenating the name of the table with the suffix RecordGen. For
example, a table named Customer will have a record class called CustomerRecordGen.
Iron Speed Designer generates the database specific code in the generated class and a stub safe class. The file
containing the safe class is created once and is not overwritten by Iron Speed Designer. The generated class is
overwritten whenever changes related to the database are made in Iron Speed Designer.
The TableJoinRecord class is used for virtual records derived from joining multiple tables together. This is described
elsewhere in this Guide.
For more detail, see:
<TABLE>RecordGen Class
z Page 319
<TABLE>Record Class
<TABLE>RecordGen Class
The main purpose of the generated class is to provide a set of convenience methods that can access the record using
names you specified on the Databases page in Iron Speed Designer. Please refer to the methods defined on the
PhysicalRecord class defined earlier in this Guide for the complete set of functions available for records derived from
this class.
The following types of methods are implemented for the generated class:
Method
Description
Get
The Get methods are generated to access the value of a specified field within the record.
For example, if the Customer table has fields called FirstName and LastName, then two
methods with the following names will be generated:
GetFirstNameFieldValue
GetLastNameFieldValue
The naming convention used is:
Get<FIELD>FieldValue
This method calls the GetValue method in the PhysicalRecord class with the name of the
field to retrieve the value.
Set
The Set methods are generated to set the value of a specified field within the record. For
example, if the Customer table has fields called FirstName and LastName, then two
methods with the following names will be generated:
SetFirstNameFieldValue
SetLastNameFieldValue
The naming convention used is:
Set<FIELD>FieldValue
This method calls the SetValue method in the PhysicalRecord class with the name of the
field and the new value.
z Page 320
<TABLE>Record Class
The safe class for the record is derived from the generated class.
The safe class is only generated once and will never be overwritten by Iron Speed Designer. The name of the safe
class is derived from concatenating the table name with the suffix Record. For example, a table named Customer
will have a safe database class called CustomerRecord.
Please refer to the methods defined on the PhysicalRecord class defined earlier in this document for the complete set
of functions available for records derived from this class.
The following methods are implemented for the safe class:
Method
Description
New
Calls the New method of the parent class. This is provided so you can add additional business
logic here after the initialization of the record.
The generated and safe classes are generated in the namespace provided by you when you created the application.
The name of the generated class is derived from concatenating the name of the table with the suffix AccessGen. For
example, a table named Customer will have a record class called CustomerAccessGen.
z Page 321
Iron Speed Designer generates the database specific code in the generated class and a stub safe class. The file
containing the safe class is created once when and is not overwritten by Iron Speed Designer. The generated class
is overwritten whenever changes related to the database are made in Iron Speed Designer.
There is a separate class is used for virtual tables such as database views or when joining multiple tables together.
This is described later in this Guide.
For more detail, see:
<TABLE>AccessGen Class
<TABLE>Access Class
<TABLE>AccessGen Class
Purpose
This class provides a set of convenience methods for accessing data from this table.
Methods
Method
Description
CreateRecord
Creates a new record in the database based on the values for the various fields
specific to this record. The values of the various fields are passed as an argument to
this method.
The actual update to the database happens when the transaction is committed as part
of completing the changes on the page.
GetRecord
Properties
Property
Description
<FIELD>column
Returns the field definition object that contains the schema definition, formatting
criteria, default values, etc.
z Page 322
<TABLE>Access Class
Purpose
The safe class for the Table Access class is derived from the generated class.
The safe class is only generated once and will never be overwritten by Iron Speed Designer. The name of the safe
class is derived from concatenating the name of the database table with the suffix Access. For example, a database
table named Customer will have a safe Table Access class called CustomerAccess.
Methods
Method
Description
New
Calls the New method of the parent class. This is provided so you can add additional
business logic here after the initialization of the record set.
Iron Speed Designer creates an additional sub-class, called the safe class, where you can add business logic without
worrying about the files being overwritten.
z Page 323
<COMPONENT>RecordGen Class
<COMPONENT>Record Class
<COMPONENT>RecordGen Class
Purpose
The generated class for the table joined record is derived from the VirtualRecord class in the Iron Speed base classes.
This class is re-generated every time you modify the join criteria. The name of the generated class is derived by
concatenating the component name with the suffix RecordGen. For example, a table containing Order, Product and
Customer data called DetailedOrders will have a generated class called DetailedOrdersRecordGen.
This class provides a set of convenience methods that can access the data from this virtual record. Please refer to the
methods defined on the VirtualRecord class defined earlier in this Guide for the complete set of functions available for
records derived from this class.
Methods
Method
Description
Get
The Get methods are generated to access the value of a specified field within the joined
record. For example, if the Customer table has fields called FirstName and LastName,
then two methods with the following names will be generated:
GetCustomerFirstNameFieldValue
GetCustomerLastNameFieldValue
The naming convention used is:
Get<TABLE><FIELD>FieldValue
This method calls the GetValue method for the attached Table Access class with the name
of the column to retrieve the value.
<COMPONENT>Record Class
Purpose
The safe class for the record is derived from the generated class.
z Page 324
The safe class is only generated once and will never be overwritten by Iron Speed Designer. The name of the safe
class is derived by concatenating the table name with the suffix Record. For example, a table containing Order,
Product and Customer data called DetailedOrders will have a generated class called DetailedOrdersRecord.
Please refer to the methods defined on the VirtualRecord class defined earlier in this document for the complete set of
functions available for records derived from this class.
Methods
Method
Description
New
Calls the New method of the base class. This is provided so you can add additional
business logic here after the initialization of the record.
Iron Speed Designer creates an additional sub-class called the safe class where you can add business logic without
worrying about the files being overwritten.
For more detail, see:
<COMPONENT>AccessGen Class
z Page 325
<COMPONENT>Access Class
<COMPONENT>AccessGen Class
Purpose
The generated class is derived from the VirtualTableAccess class in the Iron Speed base classes. This class is regenerated every time you modify the page containing this class or the database table included in this class. The name
of the generated class is derived from concatenating the component name with the suffix AccessGen. For example,
if your application has a table component called DetailedOrders showing the Order, Product and Customer tables
joined, Iron Speed Designer will create a DetailedOrdersAccessGen class for the component.
The main purpose of this class is to generate a set of convenience methods that can access the data from the joined
tables using names specified by you on the Databases page for each of the pages.
Methods
Method
Description
New
<COMPONENT>Access Class
Purpose
The safe class for the VirtualTableAccess class is derived from the generated class. The safe class is only generated
once and will never be overwritten by Iron Speed Designer.
Naming
Component Name: <COMPONENT>
Example: DetailedOrders
Example: DetailedOrdersAccess
Methods
Method
Description
New
Calls the New method of the base class. This is provided so you can add additional business
logic here after the initialization of the joined record set.
z Page 326
Database connection pooling. The Iron Speed base classes use the database connection pooling provided
by ADO.NET to minimize the overhead burden from heavy transaction loads on your database. Applications
built with Iron Speed Designer automatically use this connection pool, saving you the effort of building this
functionality.
End-user session management. Iron Speed includes session management that allows any number of
simultaneous end-user sessions.
Data validation. Most of the data field validation methods are contained in the Iron Speed base classes.
Export wizards. The file export wizard is in the Iron Speed base classes.
The Iron Speed Base classes extend the .NET Framework to support applications generated by Iron Speed Designer.
The Iron Speed base classes are provided in source code and compiled form as part of the Iron Speed Designer
installation program. The applications generated by Iron Speed Designer use classes inherited from the Iron Speed
base classes. The Iron Speed base classes themselves inherit from the Microsoft .NET Framework classes.
The Iron Speed base classes are generally
derived from .NET framework classes.
For example, the default page class used by .NET is System.Web.UI.Page. This class is sub-classed in the Iron
Speed base classes as BasePage. Applications use this base class to generate individual pages.
The purpose of the Iron Speed base classes is two-fold. First, the Iron Speed base classes provide extensions to the
Microsoft .NET Framework to deliver additional functionality. Second, it enables you to add features that apply to the
entire application by making changes to these classes.
This section documents the Iron Speed base classes and the methods that are the most likely candidates for making
changes. The Iron Speed base classes may contain a number of additional classes and methods not documented
z Page 327
here that provide additional internal support. We do not recommend changing any of the internal classes and
methods.
Please note that if you make changes to the Iron Speed base classes, Iron Speed may not be able to provide technical
support to you for your application since we will not have the changes you have made. You may at your discretion hire
our Client Engineering group to extend the Iron Speed base classes. Software engineers in our Client Engineering
group are familiar with the Iron Speed base classes and can create extensions for you quickly, efficiently and can
provide additional support to you as needed.
The Iron Speed base classes are provided to you in source code form under a restricted use license. Please review
the license agreement provided to you to view the restrictions of what you can and cannot do with the source code,
modifications to it, and the distribution of the source code or the compiled form of the Iron Speed base classes.
The following sections describe each of the classes in the Iron Speed base classes.
Page Class
In the Microsoft .NET Framework, all ASPX files have an associated class that must be derived from the Page class.
The ASPX pages are compiled at run time and cached in server memory by .NET Framework. The class derived from
the Page class serves as container for all server controls on a page. All of the code-behind for a page is contained in
the derived class.
Iron Speed Designer creates a sub-class of the .NET Framework Page class and uses it as the base class for all
generated pages.
All Page classes in your application derive from
the BasePage class.
BasePage class
The BasePage extends the default Page class of the Microsoft .NET Framework classes. All ASPX files created by
Iron Speed Designer are derived from the BasePage class.
z Page 328
Namespace
IronSpeed.Base.Web.UI
Inherits From
System.Web.UI.Page
Interfaces
IDataUpdater
IEventConsumer
IRecordComponentContainer
IPostBackRedirectEventProducer
In general, the BasePage class provides the following functionality to all of the pages in the application:
Security support: Page and security settings common to all pages such as determining if login is required
and whether the user must have a certain role (e.g., Administrator) to view the page. This class supports
HTTPS, redirection to other pages, enforcement of access control, and sign out.
Transaction support: The class implements methods that wrap a transaction within an open and close
transaction so all changes made by the user on a page are committed in a single request.
Event handling: When buttons are pressed on a page, they throw an event. These events are caught by
methods within this class.
Applications derive from the BasePage class and provide the code-behind for the generated page. The code-behind
included in the generated class provides additional validation and event handling functionality.
Use Page classes to modify the components and
other visual aspects of your generated web
application.
The inheritance model of the generated code is shown above. The BasePage class is sub-classed for each page and
then further sub-classed again. The first sub-class is considered the generated class, and is overwritten whenever
you make changes to the page in Iron Speed Designer. A class is further sub-classed from the generated class and is
called the safe class. The file containing the safe class is created once when the page is created initially and will
never be overwritten by Iron Speed Designer. The two files are generated with the .gen and .safe in their names to
help you easily identify the files containing the generated and the safe classes respectively.
z Page 329
Typically, the lowest level class is called the code-behind class by Microsoft Visual Studio .NET and contains a number
of event handling and other functionality. The file containing the code-behind class is opened when you view the
source for an ASPX page or ASCX control. To enable you to work with Microsoft Visual Studio .NET, the ASPX/ASCX
generated by Iron Speed Designer have been modified to point to the generated class as the code-behind class
instead of the lowest-level safe class. This enables you to focus on the specific changes you need to make to extend
the application without having to worry about additional code necessary to support the events handled by the page.
The following methods are implemented for BasePage:
Method
Description
AutoRedirectPostBack
Iron Speed Designer applications turn off browser caching since other users may
have changed the data in the database since the page was first viewed. This
causes the Web Page Expired message from the browser. This function
attempts to reload the page by re-querying the database based on information
stored in the session.
EnforceAccessProtocol
This method enforces the requirements for a secure connection. If the page or
the server requires HTTPS, this method redirects to an HTTPS pages.
EnforceAccessRequirements
GetCustomizedPagePath
GetRecord
This method retrieves a record for display for pages that display a single record.
This method checks the URL to get the key for the record and calls methods on
the Table Utils class to retrieve the data from the database.
In general, the method on BasePage is provided as a backup method. The
specific sub-class of BasePage will override this method.
This method implements the GetRecord method of the
IRecordComponentContainer interface.
z Page 330
Method
Description
GetSessionNavigationHistory
This method retrieves the navigation history stored in the session cache. This
method is used to return the user to the last web page after the user presses OK
or Cancel buttons on a web page. Please note that this method does not handle
the Back or the Forward buttons on the browser. The browser itself handles
those buttons.
GetTable
IsReRequest
This method returns True only if the Response for the current Request should be
constructed using the cached ViewState. This is True if the current Request is not
a (regular) PostBack, and the URL contains a specific URL parameter value, and
the cache contains cached ViewState.
LoadPageStateFromCache
This method retrieves and de-serializes this page's ViewState from the
application's cache.
LoadPageStateFrom
DefaultPersistenceMedium
Calls the base method to load the page state from the default persistence
medium.
LoadPageStateFromFile
This method de-serializes the contents of the specified File into a ViewState
object.
LoadPageStateFromString
LogUnhandledException
OnError
This method logs the last error in the event log and calls the method of the base
class to further handle the error.
OnIronSpeedEvent
This method handles the events raised by the other controls on a page. The
three specific events handled by this method in the BasePage class are:
z Page 331
Method
Description
UpdateData
ResetData
LogOut
Logs the user out by calling the logout method of this class.
Page_Init_RedirectToCustomize
dPage
Page_Load_InitPageSettings
Page_PreRender_DataBindOnP
ostBack
Page_Unload_EndTransaction
This method is called whenever a page is unloaded, i.e., when the application
user goes to a different page. This method checks to see if the page was
rendered, and in case the rendering of the page is not complete, this method
ends the transaction. This is to ensure that all transactions or complete or closed
without completion.
RedirectAfterEvent
This method handles the redirection necessary after the application user takes an
action. For example, if a button is pressed, this method redirects the application
user to the specific URL.
RedirectToCustomizedPage
z Page 332
Method
Description
RedirectToDefaultPage
Every application has a default page the first page of the application. By
default, Iron Speed Designer applications set a default page as the User page.
This method redirects to the default page. This method is called whenever for
example the login fails because of an invalid account.
RedirectToForbiddenPage
RedirectToLoginPage
RedirectToSSLPage
RegisterClientScript
RemoveCurrentRequestFromSe
ssionNavigationHistory
Render
The Render method is derived from the Control class and is used to render the
contents of the page. This method is sub-classed by each of the controls on the
page to display their controls.
In the case of BasePage, this method also ends the initial transaction that was
created to retrieve the data.
SavePageStateToCache
This method serializes the specified ViewState to a string and stores it in the
application's cache.
SetResponseUncacheable
This method sets the page to be un-cacheable. If you like the page to be cache,
you can override this method.
UpdateData
This method is called to update the data once the user completes entering data
on the page. This method calls the updateData method of each of the controls to
retrieve the data from each of them and calls Commit Transaction to complete the
transaction.
z Page 333
Database Classes
The Database classes in the Iron Speed base classes provide the infrastructure to handle data from a database.
There are two sets of classes that make up the Database classes. The first set of classes corresponds to a record
from the database and the second set corresponds to a set of records.
The Iron Speed Designer database classes provide controls for columns, records, table utilities and tables (your
application database schema). These controls work together to capture all the schema information needed to
compose and display the different tables required by your application. These controls include the functions to display
a list of record data inside a table or retrieve a record that includes specific field values.
For more detail, see:
Record Classes
Record Classes
The record classes represent a record from the database. Some of the record classes specify an actual record in the
database while others correspond to a virtual record the result of a join between tables. These classes also follow
an inheritance model similar to the Page class described above.
z Page 334
The inheritance model of the generated code is shown above. The PhysicalRecord class in the Iron Speed base
classes is sub-classed for each table and then further sub-classed again. The VirtualRecord class is used when a
table join is specified, and the record does not correspond to a specific table in the database.
Unlike the Page classes described above, the first sub-class contains the database table specific code generated by
Iron Speed Designer. The second sub-class is considered the safe class. Iron Speed Designer does not overwrite
files containing this safe class. The file containing the safe class is created once and is never overwritten by Iron
Speed Designer. The generated class is overwritten whenever changes related to the database table are made in
Iron Speed Designer.
None
Interfaces
None
The methods in this class can be overridden to provide additional formatting for display purposes. The recommended
place to override these methods is in the safe class of the specific table.
In following methods are defined for the BaseRecord class:
z Page 335
Method
Description
getDisplayString
This method returns the string or display value of the field. The string value is may
not be reverse parse-able to the original value. For example, the credit card
number field might be encoded with XXXX to hide the number and, as such, cannot
be parsed back to the original value.
getString
This method returns the string or display value of the field. The string value is
reverse parse-able to the original value.
getTypeName
This method returns the type of the record. The type of the record is made up of
the applications id and the name of the database table.
getValue
This method returns the value of the field and converts it to one of the Iron Speed
Designer data types (e.g., Credit Card Number). This method calls the getVariable
method to retrieve the value.
getVariable
This method returns the value of a column or field from the database. This gets the
value of string fields. This method must be overridden by the sub-classes of
BaseRecord.
IsReadOnly
setString
setValue
This method accepts the value as one of the Iron Speed Designer data types and
coverts it to its native format and sets the value in the record. This method calls the
setVariable method to set the value.
setVariable
This method sets the value of a variable in the record so that it can be updated in
the database. This sets the value of string fields. This method must be overridden
by the sub-classes of BaseRecord.
BaseRecord
Interfaces
None
z Page 336
Description
CopyRecord
create
Creates a new record and initializes it. If the record supports workflow, the
record is set to the first workflow state.
deleteRecord
Equals
Compares another record with this record to see if this is the same record.
The record is defined as the same record if its primary key is the same and
all of its fields have the same exact value.
getCreate_Date
Returns the Create Date. This is the date and time this record was created.
getCreate_DateAsSqlType
Returns the Create Date as a SQL Type. This is the date and time this
record was created.
getCreator_Id
Returns the ID of the Creator. The Creator is the application user who
created the record. Note that the Creator ID might be NULL.
getCreator_IdAsSqlType
Returns the Id of the Creator as a SQL Type. The Creator is the application
user who created the record. Note that the Creator ID might be NULL.
GetHashCode
Returns a hash code for the record. The hash code is used in the URL when
a hashed value is required instead of the actual value.
getId
getIdAsSqlType
getUpdate_Date
Returns the Update Date. This is the date and time this record was updated.
getUpdate_DateAsSqlType
Returns the Update Date as a SQL Type. This is the date and time this
record was updated.
getUpdater_Id
Returns the ID of the Updater. The Updater is the application user who
created the record. Note that the Updater ID might be NULL.
getUpdater_IdAsSqlType
Returns the ID of the Updater as a SQL Type. The Updater is the application
user who created the record. Note that the Updater ID might be NULL.
z Page 337
Method
Description
getVariable
This method returns the value of a column or field from the database. This
gets the value of string fields.
IsReadOnly
New
setVariable
This method sets the value of a variable in the record so that it can be
updated in the database. This sets the value of string fields.
BaseRecord
Interfaces
None
Description
IsReadOnly
New
Equals
Compares another record with this record to see if this is the same record.
The record is defined as the same record if its primary key is the same and
all of its fields have the same exact value.
GetHashCode
Returns a hash code for the record. The hash code is used in the URL
when a hashed value is required instead of the actual value.
deleteRecord
create
Creates a new record and initializes it. If the record supports workflow, the
record is set to the first workflow state.
z Page 338
Method
Description
getVariable
This method returns the value of a column or field from the database. This
gets the value of string fields.
setVariable
This method sets the value of a variable in the record so that it can be
updated in the database. This sets the value of string fields.
CopyRecord
getIdAsSqlType
getId
getCreator_IdAsSqlType
getCreator_Id
Returns the ID of the Creator. The Creator is the application user who
created the record. Note that the Creator ID might be NULL.
getUpdater_IdAsSqlType
getUpdater_Id
Returns the ID of the Updater. The Updater is the application user who
created the record. Note that the Updater ID might be NULL.
getCreate_DateAsSqlType
Returns the Create Date as a SQL Type. This is the date and time this
record was created.
getCreate_Date
Returns the Create Date. This is the date and time this record was
created.
getUpdate_DateAsSqlType
Returns the Update Date as a SQL Type. This is the date and time this
record was updated.
getUpdate_Date
Returns the Update Date. This is the date and time this record was
updated.
z Page 339
The inheritance model of the generated code is shown above. The PhysicalTableAccess class in the Iron Speed base
classes is sub-classed for each database table and then further sub-classed again. The VirtualTableAccess class is
used when a table join is specified and the record does not correspond to a specific table in the database.
The first sub-class in an application contains the database table specific code generated by Iron Speed Designer. The
second sub-class is considered the safe class; Iron Speed Designer does not overwrite files containing this safe
class. The file containing the safe class is created once and is never overwritten by Iron Speed Designer. The
generated class is overwritten whenever changes related to the database table are made in Iron Speed Designer.
None
Interfaces
None
The methods in this class can be overridden to provide additional functionality. The recommended place to override
these methods is in the safe class of the specific table.
z Page 340
Description
getInstance
Equals
GetHashCode
Returns the hash code for this class the hash code is used by to store the
instances of this class in a hash table in the session object.
getTypeName
Returns the unique name of the table by combining it with the application ID.
convertCOMException
createDataTable
createStringDataTable
TableAccess
Interfaces
None
Description
createRecord
Creates a new record in the record set. The new record can be created by
specifying as little or as much information about the record. There are a number
of different versions of this method based on the input parameters that take a
varying amount of initial information for specifying the content of the record.
deleteAll
This method deletes all the records from the record set. The transaction must
be committed to delete the records from the database. Otherwise, this is simply
a deletion of records from the cached version of the record set.
z Page 341
Method
Description
deleteRecord
Given an ID of the record, this method deletes it from the record set. The
transaction must be committed to delete the record from the database.
Otherwise, this is simply a deletion of the record from the cached version of the
record set.
drillDown
Handles the event where the application user desires to drill down to the next
level to navigate the Yahoo-style hierarchical data navigation.
export
Exports the current set of records in a CSV (comma separated values) file
format. Only the current set of records that meeting the filtering criteria are
exported, including the records that are not being displayed on the current page.
All the fields for the current set of records are displayed including the fields not in
the current table.
getCount
Returns the total number of records returned on the record set based on the
current query in effect.
getList
This method is the workhorse method for retrieving data from the database.
There are a number of variations of this method implemented in the Iron Speed
base classes. Each method takes a varying number of arguments and performs
a query on the database. Some methods get the next page from the database,
while others search or filter based on the criteria specified by the application
user.
This method supports all the queries supported by the Iron Speed base classes
including:
getRecordInstance
z Page 342
Method
Description
getStats
Returns a string indicating the current page number out of the total number of
pages based on the records currently being displayed.
New
TableAccess
Interfaces
None
Description
drillDown
Handles the event where the application user desires to drill down to the next
level to navigate the Yahoo-style hierarchical data navigation.
export
Exports the current set of records in a CSV (comma separated values) file
format. Only the current set of records that meeting the filtering criteria are
exported, including the records that are not being displayed on the current page.
All the fields for the current set of records are displayed including the fields not in
the current table view.
getCount
Returns the total number of records returned on the record set based on the
current query in effect.
getList
This method is the workhorse method for retrieving data from the database.
There are a number of variations of this method implemented in the Iron Speed
base classes. Each method takes a varying number of arguments and performs
a query on the database. Some methods get the next page from the database,
while others search or filter based on the criteria specified by the application
user.
This method supports all the queries supported by the Iron Speed base classes
including:
z Page 343
Method
Description
getRecordInstance
getStats
Returns a string indicating the current page number out of the total number of
pages based on the records currently being displayed.
New
Field Classes
No additional information is available at this time.
Microsoft SQL Server Type
Integer
bigint
NumberColumn
int
NumberColumn
smallint
NumberColumn
tinyint
NumberColumn
Bit
bit
BooleanColumn
Decimal - Numeric
decimal
DecimalColumn
numeric
DecimalColumn
z Page 344
Money
money
CurrencyColumn
smallmoney
CurrencyColumn
Floating Point
float
FloatingPointColumn
real
FloatingPointColumn
Date
datetime
DateColumn
smalldatetime
DateColumn
Character
char
StringColumn
varchar
StringColumn
text
VeryLargeStringColumn
Wide Character
nchar
StringColumn
nvarchar
StringColumn
ntext
VeryLargeStringColumn
Binary
binary
Not supported
varbinary
Not supported
image
Not supported
Other
sql_variant
Not supported
timestamp
Not supported
uniqueidentifier
Not supported
Validator Classes
The Microsoft .NET Framework supports user input and data validation at multiple levels. Validation can be performed
at each level and possibly at all levels. There are obvious advantages and disadvantages of using the various levels.
The Iron Speed base classes support validation at all of the levels as described below:
z Page 345
1. Client-side input validation: Client-side validation is performed by a set of JavaScript functions. The
JavaScript functions are common across all Iron Speed Designer applications and are stored in the <Iron
Speed Folder>\Platform\IronSpeedWebUIValidation.js file. Client-side validation reduces the load on servers
and gives immediate feedback to the application user without waiting for an answer from the server. While it is
advantageous to use client-side validation, unfortunately not all browsers support client-side validation. As
such, this layer is only used if supported by the browsers.
2. Server-side input validation: Server-side validation is performed using Microsoft .NET validators. Serverside validation in done using standard validation specified in the Iron Speed base classes and custom
validation that you specify.
The Iron Speed base class validators extend the standard Microsoft .NET validators to provide additional
functionality and they are documented in this section. The custom validation that you can add to each page is
described in more detail in documentation related to the generated pages.
The Iron Speed base class validators are called after the client-side validation is complete and are common
across all Iron Speed Designer applications. These validators verify the values entered by the user based on
the type of value (e.g., string). All user input will go through these validators. These validators are however
not used when data is being imported.
3. Field-level validation: The Iron Speed base classes provide validation based on the field types supported by
Iron Speed Designer. This validation is provided by the Database classes described in a separate section of
the manual and are common across all Iron Speed Designer applications. The field-level validation functions
are called for both user input validation as well as import validation. Since both the import and input functions
use this layer, error message reporting is done by throwing exceptions.
4. Record-level validation: Iron Speed Designer automatically generates a Database class for each table.
There is a safe base class created where you can add additional validation. By default, Iron Speed Designer
does not generate any validation code in this class. You can add validation here if necessary to ensure
database consistency. For example, if you want to ensure that the record contains the credit card expiration
date whenever a credit card number is present, you can specify the validation logic at this layer.
5. Database validation: You can specify constraints that are checked by the database management system on
the Databases pages of Iron Speed Designer. Iron Speed Designer allows you to specify that a value is
unique, or that the value is one of a set of values.
z Page 346
z Page 347
System.Web.UI.WebControls.BaseValidator
Interfaces
IValidatorComponent
Method
Description
ClientValidationFunction
GetControlToValidate
GetValueToValidate
New
Constructor used to create the base class. Sets the font and the size of
the font to be used for displaying validation messages.
OnDataBinding
This method notifies a server control to perform any data binding logic
that is associated with it. This method overrides the OnDataBinding
method of the underlying base class. In the Iron Speed base classes,
this function informs the validator of the enclosed record control to
perform the validation.
PublicEvaluateIsValid
z Page 348
Method
Description
RegisterClientScript
RegisterErrorMessageScript
UsaPhoneNumberValidator base
class
RecordControlCustomValidator base
class
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
EvaluateIsValid
z Page 349
Method
Description
validates the value. If there is no value provided, the validator returns True.
Inherits From
System.Web.UI.WebControls.CompareValidator
Interfaces
IValidatorComponent
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
GetValueToValidate
GetControlToValidate
z Page 350
Method
Description
OnDataBinding
This method notifies a server control to perform any data binding logic that is
associated with it. This method overrides the OnDataBinding method of the
underlying base class. In the Iron Speed base classes, this function informs
the validator of the enclosed record control to perform the validation.
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and validates
the value. If there is no value provided, the validator returns True.
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid. If there is no value provided, the validator returns True.
z Page 351
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid. Calls the IsValidCardNumber shared method of the
CreditCardNumberColumn class.
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid. The value is checked to ensure it is a valid currency amount
and also compared with the minimum and maximum allowed for the currency. The
currency number is also checked to see if it is within the maximum number of
decimal places allowed.
z Page 352
Inherits From
System.Web.UI.WebControls.CustomValidator
Interfaces
IValidatorComponent
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
GetValueToValidate
GetControlToValidate
OnDataBinding
This method notifies a server control to perform any data binding logic that is
associated with it. This method overrides the OnDataBinding method of the
underlying base class. In the Iron Speed base classes, this function informs
the validator of the enclosed record control to perform the validation.
z Page 353
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
AddAttributesToRender
This method adds attributes to the generated code to check for time.
EvaluateIsValid
AllowTime
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.
z Page 354
Inherits From
BaseIronSpeedValidator
Interfaces
IValidatorComponent
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and calls the
PublicEvaluateIsValid method for validation.
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
z Page 355
Method
Description
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
AddAttributesToRender
This method adds attributes to the generated code to check for minimum and
maximum values and maximum decimal places.
EvaluateIsValid
MinValue
MaxValue
MaxDecimalPlaces
Sets the maximum number of decimal places after the decimal point allowed
for this field.
z Page 356
Method
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
EvaluateIsValid
MinLength
MaxLength
AddAttributesToRender
This method adds attributes to the generated code to check for time.
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.
z Page 357
Inherits From
System.Web.UI.WebControls.RangeValidator
Interfaces
IValidatorComponent
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
GetValueToValidate
GetControlToValidate
OnDataBinding
This method notifies a server control to perform any data binding logic that is
associated with it. This method overrides the OnDataBinding method of the
underlying base class. In the Iron Speed base classes, this function informs
the validator of the enclosed record control to perform the validation.
z Page 358
Method
Description
New
Constructor used to create the validator class. Turns off client script checking for the
record validation.
EvaluateIsValid
Calls the validateData method of the base record control and returns its value. Your
custom validation logic can be added in the validateData method of the record
control.
Inherits From
System.Web.UI.WebControls.RegularExpressionValidator
Interfaces
IValidatorComponent
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
GetValueToValidate
z Page 359
Method
Description
GetControlToValidate
OnDataBinding
This method notifies a server control to perform any data binding logic that is
associated with it. This method overrides the OnDataBinding method of the
underlying base class. In the Iron Speed base classes, this function informs
the validator of the enclosed record control to perform the validation.
Inherits From
System.Web.UI.WebControls.RequiredFieldValidator
Interfaces
IValidatorComponent
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
GetValueToValidate
z Page 360
Method
Description
GetControlToValidate
OnDataBinding
This method notifies a server control to perform any data binding logic that is
associated with it. This method overrides the OnDataBinding method of the
underlying base class. In the Iron Speed base classes, this function informs
the validator of the enclosed record control to perform the validation.
Description
New
EvaluateIsValid
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.
z Page 361
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.
Description
New
Constructor used to create the validator class. Sets the method to be called for
validation and the error message to report to the application user if the value is
invalid.
EvaluateIsValid
Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.
z Page 362
Method
Description
New
Constructor used to create the validator class. Sets the method to be called
for validation and the error message to report to the application user if the
value is invalid.
AddAttributesToRender
This method adds attributes to the generated code to check for 9-digit ZIP
Codes.
EvaluateIsValid
IsRequires9Digits
Sets a Boolean flag to determine if all 9 digits of the ZIP Code are required.
Filter Classes
Filter controls are web controls that can be attached to Show Table pages or other regular form input web controls
(e.g. TextBox). Once attached, the filter control monitors the form control for changes, and automatically updates the
data displayed in the Show Table control.
Filter controls are invisible controls; they provide the behavior, not the display elements of a filter. They are rendered
on the page as controls, but do not have any display elements. They can in turn be attached to any display controls or
kept invisible if desired. This allows you to separate the behavior of a filter from how the filter is displayed to the user.
For example, a field value filter can be displayed as a text box or a drop down. These filter controls are linked to the
display controls through handlers.
In the Iron Speed base class terminology, anything that limits the data displayed on a page is a filter, including search
and pagination controls. For example, a search control limits the data seen based on the search string. Similarly, the
pagination control allows the application user to view a page of records at a time.
Currently the filter classes must be linked to controls on the same page.
The Iron Speed base classes support the following different types of filters:
Category and Sub-category filters: Enables the display of a Yahoo-style hierarchical navigation filter to
navigate up or down a hierarchy. The sub-category filters allow navigating down to the next level, one at a
time.
Date filters: Enables the display of one or two text box fields to enable application users to filter a set of
records based on a starting or ending dates.
z Page 363
Column sorting filters: Enables alphabetical sorting of a set of records. Supports toggling between
ascending and descending sort.
Numeric value filters: Enables the displays of one or two text box fields to enable application users to filter a
set of records based on a starting or ending numeric value. Can be attached to fields that are numbers,
decimal numbers, or currency.
Pagination filters: Enables the display of a number of controls to enable application users to set the number
of records to show on a page, as well as the standard pagination buttons to go to the first page, previous page,
next page and last page.
Search filters: Enables the display of a text box to search for a text string specified by the application user.
One of the most powerful features of the Iron Speed base classes is that all of the filters work cooperatively. So if you
search for a text string, the other filters only show the choices based on the remaining records. For example, if you
search for the last name of a customer such as Johnson, the filter that shows U.S. States will automatically adjust
itself to show only the states where the matching customer name is found in your database. This enables the
application users to continually refine their selection and allows them to deal with the information that is more relevant.
The Iron Speed filter classes are derived from
the WebControl class of the Microsoft .NET
Framework.
z Page 364
System.Web.UI.WebControls.WebControl
Interfaces
IEventConsumer
IEventProducer
IFilterComponent
This class provides the following functionality to the classes that derive from this class:
Display: Link to a display control that provides the filtering capability to the application user.
SQL Query: Provides methods to retrieve and set the Where clause of a SQL query to support the filtering.
Events: This base class provides methods to hook up the producers and consumers of events raised by this
control or other controls. For example, a Go button of a search control will raise an event to begin searching
for a text string in a table.
Description
IronSpeedEvent
Raises an Iron Speed Event to handle a change in the filter. The event may
be caught by other controls on the page.
OnIronSpeedEvent
Consumes the Search and DataChanged event types and sends the events to
other controls to handle.
filter
z Page 365
the application user selects the next category, a subsequent category selection is shown in its place for the application
user to navigate to the next level.
Inherits From
System.Web.UI.WebControls.WebControl
Interfaces
IEventConsumer
IEventProducer
IFilterComponent
Description
IronSpeedEvent
Raises an Iron Speed Event to handle a change in the filter. The event may be
caught by other controls on the page.
OnIronSpeedEvent
Consumes the Search and DataChanged event types and sends the events to
other controls to handle.
FieldValueFilterControl
Description
formatFieldValue
Returns a formatted display string for the specified field and value. If
bEnsureParseable is True, the returned string can be parsed using the
parseFieldValue method, else the returned string may be unparseable. Some
display controls display parseable field value strings.
parseFieldValue
Returns a field value object from the specified field and value string. Throws
an exception if the specified value string cannot be parsed.
getColumnValueChoices
Returns an array of distinct String values, representing all of the possible field
values for this control's filter, based upon the state of the current filterable.
z Page 366
Method
Description
Works the same as the base class's implementation, except it ignores the time
portion of the field values. Note that if the less-than or less-than-or-equal-to
operators are used, the comparison must be done to the last minute of the
day. As such if the application user specifies an end date of 12/31/2002, it
implies that all records occurring a minute prior to midnight (11:59:59 PM)
must be shown. As such, the returned input value string needs to be modified
to add time.
System.Web.UI.WebControls.WebControl
Interfaces
IEventConsumer
IEventProducer
IFilterComponent
Description
IronSpeedEvent
Raises an Iron Speed Event to handle a change in the filter. The event may be
caught by other controls on the page.
OnIronSpeedEvent
Consumes the Search and DataChanged event types and sends the events to
other controls to handle.
filter
Determines the column being sorted and determine the ascending or descending
order based on the previous setting. This information is then passed on to the
Show Table and an event is raised to refresh the table with the latest sort settings.
z Page 367
Inherits From
BaseFilterControl
Interfaces
IEventConsumer
IEventProducer
IFilterComponent
Description
createFilter
Creates a filter and adds it to the table view so events raised by table
view will be reported to this filter.
Field
Sets the name of the field that is being filtered. Used by the derived
controls to display a label next to the filter control.
formatFieldValue
Returns a formatted display string for the specified field and value. If
bEnsureParseable is True, the returned string can be parsed using the
parseFieldValue method, else the returned string may be unparseable.
Some display controls display parseable field value strings; others do
not.
getColumnValueChoices
getFieldValueFromDisplayControl
MaxDisplayedValues
NoSelectionText
Sets the first value displayed in the dropdown list of a filter. By default,
this is set to All. However, the derived classes can change that to
another value.
Operator
Sets the comparison operator in the query to use when used with text
field filters. For example, a date filter might use the less than (<)
operator to compare to ensure the date of records returned are less
than a date provided by the application user.
z Page 368
Method
Description
parseFieldValue
Returns a field value object from the specified field and value string.
Throws an exception if the specified value string cannot be parsed.
setDisplayControl
updateDisplayControl
Updates the associated display control of the filter to match the state
based on the table view.
updateFilter
Updates the associated table view with the filter set by the application
user.
System.Web.UI.WebControls.WebControl
Interfaces
IEventConsumer
IEventProducer
IFilterComponent
Description
IronSpeedEvent
Raises an Iron Speed Event to handle a change in the pagination filter. The
event may be caught by other controls on the page.
OnIronSpeedEvent
Consumes the Search and DataChanged event types and sends the events to
other controls to handle.
filter
Determines the control that was clicked, determines the action needed and
passes the event to the Show Table page. An event is also raised to refresh the
table view control with the latest pagination settings.
z Page 369
System.Web.UI.WebControls.WebControl
Interfaces
IEventConsumer
IEventProducer
IFilterComponent
Description
filter
Determines the control that was clicked, determines the action needed and
passes the event to the Show Table page. An event is also raised to refresh
the table view control with the latest search string or checkbox settings.
GetValueFromControl
As the name implies, this method retrieves the value from the search control
text box or all the checked checkboxes.
IronSpeedEvent
Raises an Iron Speed Event to handle a change in the pagination filter. The
event may be caught by other controls on the page.
OnIronSpeedEvent
Consumes the Search and DataChanged event types and sends the events to
other controls to handle.
SetValueInControl
As the name implies, this method sets the values of the text control to a string
or the state of the checkboxes.
z Page 370
TRANSACTION MANAGEMENT
Transaction Model
In web-based applications, it's particularly difficult to accumulate transaction information across multiple pages, moving
from one page to another, because of the stateless nature of the web. This makes it important to understand what
constitutes a transaction and when it should be committed to the database. For example, a typical web-based order
check out process, such as a shopping cart, collects different aspects of the order in a series of pages, such as the
customers name and address, credit card information, and shipping instructions.
The difficulty is that there are few options for storing information collected on those pages other than in the database,
in the .NET cache, or in browser cookies. Unfortunately, storing a users transaction information in browser cookies
poses security and bandwidth issues. So, for most applications, storing transaction information in the database is the
best option. This makes it important to understand what constitutes a transaction and when it is committed to the
database.
Iron Speed Designer generates applications with a page-based transaction model. This means that all of the
changes made to any underlying database table on the current web page are submitted when the user clicks OK (or
takes a similar action on the page). I.e., upon clicking OK (or similar action), all changes made on the page are
committed to the database as part of a single transaction. Specifically, Iron Speed Designer applications use the
transaction classes in ADO.NET to perform commits and rollbacks.
This order form illustrates how data can be called
from multiple database tables into one page in a
parent-child relationship. When Save is clicked,
records are inserted into several tables, including the
Order, Order Details, and Customer tables. In
particular, multiple records are inserted into the
Order Details table, one record for each line item.
The entire transaction is concluded with a single
commit.
z Page 371
Iron Speed Designer uses stored procedures to update the database when appropriate. If there are multiple related
records being added or updated as part of a single transaction (e.g., Orders with multiple Order Items), then each
record is updated individually requiring multiple round-trips to the database. The record insertions, updates, and
deletions themselves are preformed within database stored procedures, but the application logic calling these stored
procedures is resident in the generated Visual Basic .NET code.
In a multi-part transaction, the entire transaction is concluded with a single COMMIT statement at the end of the
transaction. I.e., while these many-to-many updates do require multiple trips to the database, they are committed to
the database by a single COMMIT at the end of the transaction.
Images in tables that have a primary key are displayable and downloadable (exportable).
Binary data in tables that have a primary key are downloadable (exportable), but are not displayable.
Images in tables that do not have a primary key are not downloadable (exportable) or displayable.
Binary data in tables that do not have a primary key are not downloadable (exportable) or displayable.
The reason for the latter two restrictions is that binary data cannot be embedded inside an HTML response stream. A
pointer to it must be embedded so that the browser can subsequently request each piece of binary data using a
separate HTTP request. For tables without primary keys, there is no way to create a unique identifier for specific
binary data in the table. Binary data is programmatically accessible using the data access classes for such tables, but
are not displayable or downloadable directly from a page without application customization.
z Page 372
When you read values from a sql_variant field, it is treated as binary data. You can easily convert it to a string, but if
you know that it's really datetime data and you want to treat it as such, then the burden is on you to explicitly convert it
back to datetime data. For example, to copy from a sql_binary back into a datetime, you would have to do:
UPDATE VariantTest
SET CreateDate = CONVERT(datetime, VariantDate)
In the example above, when you use the VariantTest table in your application, Iron Speed Designer treats the
VariantDate field as binary data. That is, Iron Speed Designer treats it exactly as if it were a field of type "binary"
(which Iron Speed Designer also supports). In Iron Speed Designer, you can change the validation type to a Date,
String, Decimal, US State, or as any other supported data type.
z Page 373
doing this requires application developers to be experts in two languages their primary development language C#,
Visual Basic, or Java as well as SQL. This is oftentimes difficult for most developers.
If SQL statements are placed in the database layer, they are stored in stored procedures resident in the database
itself. This not only moves the SQL to a different layer in an n-tier architecture, but in most cases moves it to a
physically separate server machine. In this style, the burden of writing and maintaining the SQL typically falls to the
database administrator (DBA) or an individual developer whose skill and expertise is writing SQL. Developers must
rely on the DBA to implement part of their application (the SQL) and must interface their code with the stored
procedures created by the DBA.
However, centralizing the SQL in the database layer allows a certain amount of application logic to be maintained in a
central location and shared across multiple application programs. Moreover, many developers and DBAs consider
implementing queries in stored procedures as a best practice. Consolidating most or all of an applications SQL in
stored procedures makes it easier to review, modify and tune individual queries without having to dig into application
code.
Finally there is the issue of execution performance. Generally, more complex SQL statements can be placed in stored
procedures and executed locally on the database server, reducing the number of round-trips between the application
program and the database. While bandwidth and latency arent issues in many behind-the-firewall applications, this
can present a problem in web services environments where the application programs arent physically proximate to the
database executing the queries.
Iron Speed Designer automatically generates all the SQL statements required for each database-connected form, web
page, table, and report in your application, as well as all the database access logic and storage management code.
Because Iron Speed Designer generates SQL based on your database table and user interface design you do not
need to know any SQL to build applications in Iron Speed Designer. A variety of data filters and navigation
components provide your end-users with additional viewing and reporting flexibility.
Most of the SQL generated by Iron Speed Designer is placed in stored procedures, enhancing run time performance
because the queries are stored and executed directly from the database. This also minimizes the number of roundtrips between the application program and the database, further enhancing performance.
Specifically:
All table and record retrieval, record insertion, record update and record deletion SQL queries are placed in
stored procedures.
Table join queries, however, are in placed in Visual Basic .NET functions.
The stored procedures for creating, updating, and deleting records accept field values as parameters, such as record
ID's and filter strings, and then execute the appropriate INSERT, UPDATE, or DELETE statements in the stored
procedures.
z Page 374
Purpose
<PREFIX>Add
<PREFIX>Delete
<PREFIX>DeleteRecords
<PREFIX>DrillDown
<PREFIX>Export
<PREFIX>Get
<PREFIX>GetList
<PREFIX>GetStats
<PREFIX>Update
Each procedure is uniquely named because Microsoft SQL Server (Transact-SQL) does not have the concept of a
package. Each stored procedure name is prefixed with:
p<APP NAME><TABLE>
<APP NAME> is the name you assigned to the application when you created it.
<TABLE> is the name of the table upon which the procedure operates.
For example, the Add procedure for an Employee table in an application whose name is HR is named:
PHREmployeeAdd
Please note that if two developers are building applications using the same physical database on the same server,
then they must use different application names for their respective applications. If the two names are the same,
possibly because they are both working on the same application, then the stored procedures will have the same
names and will be constantly overwriting each other's stored procedures.
z Page 375
<PREFIX>Add
Parameter Name
Type
Description
p_initiator_id
INTEGER
Login ID of the user creating the record. Used for audit trail
purposes.
p_c1
p_c2
etc.
Depends on
the field
The column values for the record. One column value is provided
for each field in the database table.
p_id
INTEGER
Output
<PREFIX>Delete
Parameter Name
Type
Description
p_initiator_id
INTEGER
Login ID of the user creating the record. Used for audit trail
purposes.
p_id
INTEGER
<PREFIX>DeleteRecords
Parameter Name
Type
Description
p_initiator_id
INTEGER
Login ID of the user creating the record. Used for audit trail
purposes.
p_search_str
VARCHAR2
The criteria used to create the WHERE clause that selects the
records to be deleted.
p_num_deleted
INTEGER
Output
z Page 376
<PREFIX>DrillDown
Parameter Name
Type
Description
p_select_str
VARCHAR2
p_from_str
VARCHAR2
p_where_str
VARCHAR2
The search criteria forming the WHERE clause of the SQL query.
p_sort_str
VARCHAR2
p_list
Cursor
Output
<PREFIX>Export
Parameter Name
Type
Description
p_initiator_id
INTEGER
Login ID of the user creating the record. Used for audit trail
purposes.
p_title_str
VARCHAR2
p_select_str
VARCHAR2
p_from_str
VARCHAR2
p_search_str
VARCHAR2
The search criteria forming the WHERE clause of the SQL query.
p_clob
CLOB
Output
z Page 377
Parameter Name
Type
Description
p_num_exported
NUMBER
Output
<PREFIX>Get
Parameter Name
Type
Description
p_id
INTEGER
p_cur
CURSOR
Output
<PREFIX>GetList
Parameter Name
Type
Description
p_from_str
VARCHAR2
p_search_str
VARCHAR2
The search criteria forming the WHERE clause of the SQL query.
p_sort_str
VARCHAR2
p_page_number
INTEGER
p_batch_size
INTEGER
p_total_size
INTEGER
The total number of records in the result set of the SQL query.
Output
p_list
Cursor
Output
z Page 378
<PREFIX>GetStats
Parameter Name
Type
Description
p_select_str
VARCHAR2
p_from_str
VARCHAR2
p_search_str
VARCHAR2
The search criteria forming the WHERE clause of the SQL query.
p_sort_str
VARCHAR2
p_page_number
INTEGER
p_batch_size
INTEGER
p_list
Cursor
Output
<PREFIX>Update
Parameter Name
Type
Description
p_initiator_id
INTEGER
Login ID of the user creating the record. Used for audit trail
purposes.
p_id
INTEGER
p_c1
p_c2
etc.
Depends on
the field
The field values being updated in the record. There is one field
value for each field in the table.
Database Views
A database view is simply a subset of the database sorted and displayed in a particular way. A database view limits
the records displayed and could contain a subset of records, such as "products that are in stock", or "customers that
z Page 379
have purchased goods greater than $1000". A view could also contain a subset of the information for each item, such
as "product name, description and price", but not the dimensions of the product. Similarly, the order of the columns is
specified in the database view as well. Some applications use database views or stored procedures to embed security
in the database so that the application cannot compromise security regardless the query used.
Because database views are an integral part of your underlying database structure, its important that your application
embrace them. Many organizations use database views as a way of consolidating data for reporting and other uses
where a common definition is required.
Applications generated by Iron Speed Designer fully support database views. For each view, you can control which
columns are displayed, what order they are displayed in, how wide each column is, how the data is sorted, and what
types of records to display. In general, you can perform any operation on a database view in Iron Speed Designer that
you can on any table with the exception of inputting data into the view. This must be done by inputting data into the
underlying tables from which the database view is derived.
Note, however, that you cannot create database views in Iron Speed Designer. Views must be created with other
database tools before Iron Speed Designer can use them.
A screen shot from Iron Speed Designer showing
a combination of tables and database views
included in an application.
z Page 380
An example web page generated by Iron Speed Designer. The application uses primary key
relationships to retrieve the appropriate Order table record for editing. The application uses
foreign key relationships to retrieve the associated Customer and Order Detail table records for
editing.
z Page 381
Iron Speed Designer determines foreign key relationships by querying the system information in the connected
database(s). If multiple rows are returned for a given foreign key name, it means that the foreign key name is a
composite foreign key, i.e. multiple foreign key fields referencing a primary table with a composite primary key.
z Page 382
Foreign key fields are identified by displaying the primary table and column together using the form <Table>.<Column>
in the Databases pages of Iron Speed Designer. For example, an Orders table may have a CustomerID field that is a
foreign key to the Customer.CustomerID field. If table has multiple fields referencing the same primary table, then
the foreign table has a composite foreign key.
Foreign keys with any data type. Iron Speed Designer generates applications that use foreign keys of nearly
every data type. All data types are supported as foreign keys except "text" (Very Large String) and "bit"
(Boolean), which Microsoft SQL Server will not allow as foreign keys.
Case-sensitivity of foreign keys. By default, Microsoft SQL Server treats alphabetic foreign keys as casesensitive.
Data type mismatches. Iron Speed Designer does not check to see if the data type of a foreign key matches
the corresponding field in the primary key table. This is not problematic because Microsoft SQL Server
enforces matching data types in the database itself.
Display Foreign Key As for composite (multi-field) foreign keys. Iron Speed Designer supports composite
foreign keys. However, Iron Speed Designer does not currently support "display as" for composite keys.
Self-referential foreign keys. Iron Speed Designer supports self referential foreign keys. These are foreign
key relationships where a key points into the same table.
Multiple single-column foreign keys pointing to the same table. Iron Speed Designer supports tables
containing two or more foreign keys that point to the same table.
Multiple composite foreign keys pointing to different tables. Iron Speed Designer supports tables containing
multiple composite foreign keys that point to different tables.
Multiple composite foreign keys pointing to the same table. Iron Speed Designer supports tables containing
multiple composite foreign keys that point to the same table.
Single field participating in multiple foreign keys. Iron Speed Designer does not currently support fields that
participate in multiple foreign key relationships. The underlying table binding files only allow for a single
foreign key relationship in any given field.
Foreign keys to other databases. Iron Speed Designer requires foreign keys to point to tables in the same
database. At present, Microsoft SQL Server does not support foreign keys to other databases as well.
Concurrency Control
Concurrency is an issue in database systems where two users update the same record in the database, one after the
other. If both users are viewing the same record, and then make independent changes, how the application handles
concurrency determines which users data is updated in the record. In some applications, the second user to update a
z Page 383
record will overwrite the changes made by the first. In others, the application will warn the second user that the record
they are viewing has just been updated. In still others, the second users view is automatically updated when the first
user updates the record.
Implementing concurrency handling is typically very tedious and must be applied carefully to nearly every
transaction in an application. Iron Speed Designer generates optimistic concurrency handling code for each
of your transactions so users cannot unintentionally overwrite each other's changes.
z Page 384
Implementing concurrency handling is typically very tedious and must be applied carefully to nearly every transaction
in an application. There are two commonly used concurrency detection and handling mechanisms: optimistic
concurrency control and pessimistic concurrency control. Iron Speed Designer implements the optimistic concurrency
model.
For more detail, see:
Pessimistic Concurrency
Optimistic Concurrency
Pessimistic Concurrency
Pessimistic, or negative, concurrency control is when a record is locked at the time the user begins his or her edit
process. In this concurrency mode, the record remains locked for the duration of the edit. The primary advantage is
that no other user is able to get a lock on the record for updating, effectively informing any requesting user that they
cannot update the record because it is in use.
There are several drawbacks to pessimistic concurrency control. If the user goes for a coffee break, the record
remains locked, denying anyone else the ability to update the record, even if it has been untouched by the initial
requestor. Also, in order to maintain record locks, a persistent connection to the database server is required. Since
web applications can have hundreds or thousands of simultaneous users, a persistent connection to the database
cannot be maintained without having tremendous resources on the database server. Moreover, some database tools
are licensed based on the number of concurrent connections. As such, applications that use pessimistic concurrency
would require additional licenses for use. Because of this drawback, almost all applications use optimistic concurrency
control.
Optimistic Concurrency
With optimistic, or positive, concurrency, the record is not locked during the edit phase. Instead, the record is locked
for a split second just before the new changes are committed to the database and immediately unlocked after the
changes have been made. Optimistic concurrency is generally used in environments with a low contention for data,
such as web applications, where there are minimal chances of two users needing to update a record in close proximity
to each other.
Of course, with optimistic concurrency handling, it becomes incumbent upon every requestor to check if the record has
been updated before they commit any changes. There are several techniques for testing for an optimistic concurrency
violation. One involves including a timestamp column in the table. In a test for optimistic concurrency violations, the
Update Date and Time are compared with the original value returned when the edit began. If they are the same, the
new changes are committed to the database. If the Update Date and Time have changed, because another user may
have updated the record, the second user to have completed the editing receives an error.
z Page 385
Microsoft SQL Server 7 does not support checksum calculations, so concurrency handling is not implemented
for applications built on Microsoft SQL Server 7 databases.
Applications built on Microsoft SQL Server 2000 databases, and the MSDE edition of Microsoft SQL Server
2000, use the Binary Checksum function to perform the checksum calculation. The Binary Checksum function
ignores fields of type test, ntext, image, cursor, and sql_variant.
Cursor Management
A database cursor is the resulting set of records returned by an SQL query. The cursor allows the application
developer to request each record in sequence so that the query results may be displayed in a report or otherwise
operated upon. For example, as an application user moves from page to page in an on-screen report, the subsequent
pages data is retrieved from the cursor and displayed. Its also commonplace for applications to iterate over the result
set, performing some calculation or other update to each of the records in the result set.
One issue that emerges with cursors is the recency of the data in the result set. As long as the cursor is in use, it
contains the set of records retrieved when the query was originally performed. However, this data may grow stale over
time, especially if the query result is being displayed in a report that an application user is reviewing over a period of
time minutes or hours. The application user is viewing the result set that was current when the report was first
created.
In applications where the underlying data changes frequently, it may be desirable to rerun the SQL query as the
application user moves from page to page in their report. This ensures that the currently displayed page has the
freshest data. Of course, this places an extra load on the database because it must rerun the query more frequently.
However, all modern relational databases have very good data cache management that significantly reduces the cost
of frequently rerunning queries.
A second issue to consider is whether the entire result set is pulled from the database into the application layer. When
a result set contains only a few hundred records, moving all of the data into the application program requires minimal
bandwidth and memory to store and manipulate the result set in the application. However, when the result set has
hundreds of thousands or millions of records, it becomes nearly impossible to move all of that data into the application
program. Very few application programs are structured to manipulate that quantity of data in memory without
additional file management logic, which defeats the purpose of using the underlying database which provides exactly
these facilities. So, in applications where the result sets can be large, its best for applications to retrieve only a
manageable subset of the result set from a cursor, operate on that data, and then request the next subset.
z Page 386
In keeping with this philosophy, applications generated by Iron Speed Designer use database cursors to retrieve data
from the database. The cursor is used to retrieve the number of records being displayed on the Show Table pages.
Only one page of data is retrieved from the database and displayed at a time, minimizing the data transmission load
and the application's memory storage requirements. Query results are not stored in a temporary database table. They
are retrieved directly from the database and displayed to the user.
When requesting a new page to display in a
tabular data grid, applications generated by Iron
Speed Designer run queries afresh so that the
most current data is retrieved. In this example,
clicking on the Next Page or Previous Page
buttons at the top of the table instantiate a new
database cursor to retrieve the result set. Only
the currently displayed page of data is retrieved
from the database and displayed on the web
page, eliminating the need to cache data in the
application layer of the application.
The application program does not maintain the state of the cursor. When the next page (or any other page) is
requested, the SQL query is run again to request the needed page's data. The query parameters include the page
number requested and the batch size, which is the number of records per page. The SQL query is re-run so that any
new records added since the first page was displayed are retrieved. By contrast, if the cursor were simply maintained,
any new records, record updates, and record deletions would not be reflected when going from page to page.
Moreover, maintaining the cursor requires the application to keep the database connection open, which is not an
efficient use of the available database connections.
z Page 387
as to what the appropriate alphabetic sorting is for a given character set. For example, a result set may be sorted
differently depending on the character set used for the sorting.
In Microsoft SQL Server 2000, collation can be set at various levels the database level, the table level and the field
level. There is an implied inheritance relationship among these. For example, if field level collation is not defined, the
table-level collation is used. If the table collation is not defined, it will inherit from the database.
In an English language environment, SQL queries generated by Iron Speed Designer sort properly with all Microsoft
SQL Server collation sequences, including these:
SQL_Latin1_General_CP1_CI_AS
Latin1_General_BIN
Korean_Wansung_CI_AS
In-line SQL
In-line SQL
N/A
N/A
N/A
N/A
Full-Text Search
The full-text search control uses the SQL like operator to perform its search. The search performed is case
insensitive, meaning upper- and lower-case search strings will return the same result set.
For example, if you have three searchable columns (c1, c2, c3) in your database table and the application user enters
the word "House" to search, the search control will execute the following SQL query:
z Page 388
ADO DataSets
Iron Speed Designer table view components have "built in" support for paging, sorting, and filtering. This is a custom
feature generated by Iron Speed Designer since the underlying .NET Repeater control generated by Iron Speed
Designer does not provide this support. Instead, Iron Speed Designer generates its own data access object class and
does not use the default ADO DataSet class provided in the .NET framework, which supports only in-memory paging.
Unlike .NET DataGrids, paging, sorting, and filtering in applications generated by Iron Speed Designer are done
directly in the database, meaning that only matching records need to be sent to the application layer. Also, Iron Speed
Designer generates a set of filter controls that can be used with table view components that allow the end user to
modify the filtering in the application at run time. In contrast, DataGrid filtering normally requires the developer to write
extra code.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.
z Page 389
Internal Errors
Event Logging
Internal Errors
If there are any internal errors caused by incorrect configuration or because of the unavailability of a resource, an error
message is displayed on a web page for the application user. Errors are logged to the servers event log and can be
viewed through the Event Viewer.
z Page 390
the LogDatabaseExceptions and LogCommitExceptions settings in the Web.config file described elsewhere in this
Guide.
Event Logging
Certain events are logged in the Windows Event Viewer. You can locate these in the Application Log section of the
Event Viewer. The Source will be listed as either IronSpeed or the name of your application.
z Page 391
Automatic Sign-Out
Password Storage
Firewall Security
z Page 392
4. Windows Authentication using a domain user account and password configured using .NET impersonation.
Each of these models has pros and cons.
Windows Authentication with local ASPNET Account
Pros:
Cons:
Does not support accessing a remote database, which rules it out for web applications that run on machines
separate from their database servers, a common practice.
Does not allow configuring each web application with its own application account that has access to only the
data that Web application needs.
Pros:
Cons:
Violates several security best practices, including (a) passwords should not be stored in plain text, such as in
a Web.config or Machine.config file and (b) an application should only be able to access data that it needs and
no other data. As an example, if you have an application with access to highly sensitive data (e.g., payroll
data), this approach would unnecessarily give all other applications (e.g., an order entry application) access to
this sensitive data, because it uses the same account to access data for all applications running on that
system.
Pros:
Generally more secure since users have their own login credentials for the SQL Server database.
Cons:
z Page 393
Users must use separate login credentials for SQL Server, which is more difficult for many.
Pros:
Windows Authentication doesnt require a separate database sign-in, which is easier for most users.
Cons:
More difficult to set up. See Implementing Windows Authentication with .NET Impersonation for details.
z Page 394
Step 3: Manually create a virtual directory in Microsoft IIS for your application. Iron Speed Designer may not be able
to create the virtual directory for you automatically.
Step 4: You may need to manually compile your application using the CompileApplication.bat utility.
Step 5: When running the application after changing the application to use a domain account using .NET
impersonation, the application cant access the data, even though the application domain account is a DBO of the
application database. This is because Iron Speed Designer creates the stored procedures as owned by the Iron
Speed Designer application user account rather than owned by DBO. This prevents the application, which uses a
different application account, from accessing the stored procedures.
As a temporary workaround, make the Iron Speed Designer application user account an sa (system administrator)
rather than a DBO. Iron Speed Designer then properly makes the ownership of the stored procedures DBO, and the
application user account is able to access the data.
z Page 395
Automatic Sign-Out
Iron Speed Designer-applications automatically log out application users after a period of inactivity. This feature
guards against identity theft that can occur when a user leaves their web browser open to an application, and an
unauthorized person uses that browser to extract identity information or perform transactions in the application.
After a period of inactivity, 30 minutes by default, the application user is prompted to sign in again to reaffirm their
identity. You can change this default setting by adjusting the Timeout parameter in the SessionState section of the
applications Web.config file.
<SessionState
.
Timeout=30
/>
Set Timeout to the number of minutes after which the application should sign out the user.
z Page 396
Password Storage
Most applications with built-in password security store the user name and password information in the underlying
database. While this is convenient and allows for easy administration, it isnt always the most secure because a
variety of users, mostly internal, have access to that information. A malicious employee with access to password data
can steal another users identity and forge bogus transactions. This form of identity theft is commonly used by insiders
to create fictitious customer accounts and then ship products to mail drops or to initiate credit card refunds to their own
accounts.
One simple and effective defense against identify theft is encrypting the password in the database using one of several
simple encryption protocols. The application program encrypts the clear text password before comparing it to the
stored encrypted password as part of its authentication protocol. This prevents unauthorized users from using the
passwords because the clear text version isnt stored in the database.
Iron Speed Designer automatically generates role-based security for your application. It uses user name and
password fields in your database, and not in any special tables created by Iron Speed Designer. You can quickly and
conveniently build applications on top of your existing database, using existing user names and passwords. Adding
simple but effective password encryption is easily accomplished by sub-classing the automatically generated sign in
classes in the generated class hierarchy.
Firewall Security
Often times, applications use non-standard ports to communicate with each other or to provide some common, shared
service. For example, this is usually how databases communicate with client applications, how licensing managers
communicate with individual desktops, and how many client server applications exchange data. To operate, those
ports must be open and accessible, frequently to the outside world.
Unfortunately, many IT organizations dont actively guard against attacks that use these unguarded ports because
most firewalls arent capable of understanding proprietary application protocols, and hence cant provide any level of
authentication or access control. Thus, these ports are left wide open, allowing a malicious person the opportunity to
attack your application without any safeguard other than your own applications built-in security. If an attacker can
dissect your applications proprietary protocol, you could be granting them unintended access to your database and
other assets.
Applications generated by Iron Speed Designer run in conjunction with a standard Microsoft IIS web server, which
uses port 80 and 443 to serve pages to application users. Data collected from an application user is passed through
the web server to the application and then to the database, using a standard 3-tier architecture. This permits standard
firewall products to do what they do best guard against attacks using well-known standard protocols.
z Page 397
With this code, the SQL will be executed and your database table deleted! You can combat this particular type of
attack by strictly enforcing data type validation of input fields.
Applications generated by Iron Speed Designer should be completely safe from SQL injection attacks, because all
data that affects the construction of SQL statements (and stored procedure parameters) goes through at least one
abstraction layer that properly encodes or interprets the data. While it is possible for a developer to design an
application that bypasses this security and allows custom code and / or end user input to unsafely affect the SQL
generation, doing so requires application customization to circumvent the generated security mechanisms. Moreover,
filters generated by Iron Speed Designer handles string inputs by replacing into'' which prevents the application user
from running their own SQL command such as delete table.
http://www.microsoft.com/technet/treeview/default.asp?
url=/technet/prodtechnol/sharepnt/proddocs/admindoc/owsa04.asp
http://www.microsoft.com/sql/techinfo/administration/2000/securityWP.asp
http://vyaskn.tripod.com/sql_server_security_best_practices.htm
http://www.microsoft.com/technet/treeview/default.asp?
url=/technet/prodtechnol/windowsserver2003/proddocs/server/aaconhowaspnetsecurityworks.asp
z Page 398
Session Management
Concurrent Users
Session Management
Applications generated by Iron Speed Designer use the standard .NET session management functionality.
Applications generated by Iron Speed Designer do not load balance their session objects across multiple servers.
When a user begins using an application through their browser, a session is established with the application. Within a
session, the application user conducts transactions through the application. After a period of inactivity that session is
automatically terminated. You may use load balancers to run multiple instances of an Iron Speed Designer
applications in a web farm environment.
In periods of heavy load, it can be useful to spread the transaction load from each application user across multiple
machines. This means that individual transactions within a user session can be executed on any available server
running the application. This is a very advanced form of load balancing that is required for only the very highest usage
applications.
z Page 399
Concurrent Users
As a general rule, a typical dual processor Pentium IV can handle approximately 250 simultaneous, or concurrent,
users running an Iron Speed Designer application of average complexity.
z Page 400
Iron speed Designer automatically generates the Web.config file for your application. However, you may modify the
settings as needed. If you elect to modify the Web.config file, please bear in mind:
Be sure to modify the source \<Application Folder\Source\Web.config file. Iron Speed Designer copies the
source Web.config file into the applications generated file folder, \<Application Folder>\Web.config, when
generating your application. If you edit the generated Web.config file, it will be overwritten with the source
Web.config file the next time you generate your application.
The XML syntax of the Web.config file must be strictly obeyed. If your application is unable to load the file for
any reason, the settings will not take effect.
z Page 401
Upon modifying the Web.config file, Microsoft IIS will automatically restart your application to use the new
settings.
appSettings Element
appSettings Element
The appSettings element holds a variety of key-value pairs for various settings, including the database and SMTP
email server connections.
Key
Description
ConnectionX
Description
connectionName
database
DBServer
z Page 402
Key
Description
password
status
typeOfServer
TO_BE_UNLINKED
username
Example:
The following example shows two database connections.
<configuration>
<appSettings>
<add key=Connection7 value=
typeOfServer=MS_SQL_SERVER;
DBServer=localhost;
database=TestTypes;
integratedSecurity=false;
username=sa;
status=NORMAL;
password= />
<add key=Connection8 value=
typeOfServer=MS_SQL_SERVER;
DBServer=anotherhost;
database=TestTypes;
integratedSecurity=false;
username=sa;
status=NORMAL;
password= />
z Page 403
Key
Description
</appSettings>
</configuration>
DefaultPageUrl
EmailFrom
The EmailServer and EmailFrom parameters are used for (1) email notifications
when importing data, (2) password reminders sent to application users, and (3)
workflow state change notification alerts.
Usage:
<configuration>
<appSettings>
<add key=EmailFrom value=email address />
</appSettings>
</configuration>
Example:
<configuration>
<appSettings>
<add key=EmailFrom [email protected] />
</appSettings>
</configuration>
EmailServer
The EmailServer and EmailFrom parameters are used for (1) email notifications
when importing data, (2) password reminders sent to application users, and (3)
workflow state change notification alerts.
Usage:
<configuration>
<appSettings>
<add key=EmailServer value=SMTP server name />
</appSettings>
</configuration>
z Page 404
Key
Description
Example:
<configuration>
<appSettings>
<add key=EmailServer value=mail.mycompany.com />
</appSettings>
</configuration>
ErrorPageUrl
Sets the page that is displayed when the application flags an error. This setting is
not required, and if not present in the Web.config file, a default will be assumed.
You may add/edit these settings to change the locations of the various pages.
Usage:
<configuration>
<appSettings>
<add key= ErrorPageUrl value="/MyApp/Pages/Error_Page.aspx />
</appSettings>
</configuration>
ForbiddenPageUrl
Sets the page that is displayed when the application user attempts to access a
page for which they do not have sufficient permission to access. This setting is not
required, and if not present in the Web.config file, a default will be assumed. You
may add/edit these settings to change the locations of the various pages.
Usage:
<configuration>
<appSettings>
<add key=ForbiddenPageUrl
value="/MyApp/Pages/Forbidden_Page.aspx />
</appSettings>
</configuration>
LogCommitExceptions
If the value of this property is "all" then all commit exceptions will be logged to the
Event Viewer as warnings. Normally, commit exceptions are not logged because
they are expected to occur in the course of normal application-user actions, and
logging them in a production environment could be undesirable. However, it is
useful in a development/testing environment to have a full log of the detailed
exception data for all commit failures.
Usage:
<configuration>
<appSettings>
z Page 405
Key
Description
<add key=LogCommitExceptions value=all />
</appSettings>
</configuration>
LogDatabaseExceptions
If the value of this property is "all" then all database (i.e. SQL) exceptions will be
logged to the Event Viewer as warnings. Normally, most database exceptions are
not logged because they are expected to occur in the course of normal applicationuser actions, and logging them in a production environment could be undesirable.
However, it is useful in a development/testing environment to have a full log of the
detailed exception data for all database exceptions.
Usage:
<configuration>
<appSettings>
<add key=LogDatabaseExceptions value=all />
</appSettings>
</configuration>
PrecompilePageFiles
Server
false
The Server parameter instructs Iron Speed Designer to redirect from http (nonsecure mode) to https (secure mode). It is also used for workflow state email
notifications to set the applications URL, e.g., Click here to access
Usage:
<configuration>
<appSettings>
<add key=WebServer value=base URL of web server />
</appSettings>
</configuration>
Examples:
<configuration>
<appSettings>
z Page 406
Key
Description
<add key=WebServer value=http://machinename />
</appSettings>
</configuration>
<configuration>
<appSettings>
<add key=WebServer value=http://www.mycompany.com />
</appSettings>
</configuration>
<configuration>
<appSettings>
<add key=WebServer value=http://202.168.17.26 />
</appSettings>
</configuration>
SignInPageUrl
Sets the page that is displayed when the application user is prompted to sign in to
the application. This setting is not required, and if not present in the Web.config
file, a default will be assumed. You may add/edit these settings to change the
locations of the various pages.
Usage:
<configuration>
<appSettings>
<add key= SignInPageUrl value="/MyApp/Pages/Sign_in_Page.aspx />
</appSettings>
</configuration>
SignedOutPageUrl
Sets the page that is displayed when the application signs out of the application.
This setting is not required, and if not present in the Web.config file, a default will
be assumed. You may add/edit these settings to change the locations of the
various pages.
Usage:
<configuration>
<appSettings>
<add key=SignedOutPageUrl
value="/MyApp/Pages/SignedOutPage.aspx />
</appSettings>
</configuration>
z Page 407
Description
CustomErrors
This setting associates an error page with certain types of HTTP errors, such as 404 (file
not found) and 500 (internal server error) errors.
Before:
<customErrors mode="RemoteOnly" />
After:
<customErrors mode="RemoteOnly"
defaultRedirect="Custom/Pages/Internal_Server_Error_Page.aspx" >
<error statusCode="404" redirect="Custom/Pages/Internal_Server_Error_Page.aspx" />
<error statusCode="500" redirect="Custom/Pages/Internal_Server_Error_Page.aspx" />
</customErrors>
httpRuntime
This sets the maximum file upload size, in KB, the server will accept.
See http://msdn.microsoft.com/library/default.asp?url=/library/enus/cpgenref/html/gngrfhttpruntimesection.asp for details.
maxRequestLength
The maximum file upload size, in kilobytes (KB), that the server
will accept for the application.
<httpRuntime
maxRequestLength="10240"
/>
SessionState
This change sets the StateServer service to store session data instead of storing it in
memory only, and to change the timeout setting.
Timeout
The number of minutes the application users browser session will stay
open before automatically signing out the application user.
Before:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
z Page 408
Parameter
Description
cookieless="false"
timeout="20"
/>
After:
<sessionState
mode="StateServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false"
timeout="30"
/>
http://www.gotdotnet.com/team/changeinfo/default.aspx
z Page 409
Extended Design Themes: Existing pages created with the design themes in the Enterprise Edition will
continue to work in the Professional Edition.
Advanced Field Validation: Existing pages created with advanced field validation in the Enterprise Edition will
continue to work in the applications generated with the Professional Edition. Changes to field validation cannot
be made in the Professional Edition if the database field uses a feature only available in the Enterprise Edition.
Stored Procedures: The Professional Edition does not generate stored procedures. Applications created with
the Enterprise Edition must be regenerated with the Professional Edition, and will work without using the
stored procedures.
Implicit (Virtual) Foreign Key Support: If Implicit Foreign Keys were defined for an application created with the
Enterprise Edition, they will continue to work with the Professional Version. However, changes cannot be
made to the implicit foreign keys in the Professional Edition.
Multi-database Applications: If an application using multiple databases in the Enterprise Edition and moved to
the Professional Edition, the application can continue to be generated by Professional Edition. However, new
databases cannot be added and changes to the database settings for the second and subsequent databases
cannot be made in Professional Edition.
When the application runs, the ASPX, ASCX, and code-behind files call on functions in the Iron Speed base classes.
Those functions, in turn, call on the Data Access classes to access database tables. The Data Access classes, in turn,
use ADO.NET to call on the Stored Procedures. The Stored Procedures execute SQL queries to read and write data.
In the Professional Edition, the Data Access classes are slightly different from the Enterprise Edition because they
construct SQL statements at run-time in the application layer. For example, when inserting a record into an
Employees table, the Data Access class that handles the Employees table constructs an SQL query such as "INSERT
z Page 410
INTO Employees (FirstName, LastName, ...) VALUES (...)". These SQL queries are passed to the database using
ADO.NET.
Iron Speed Designer Enterprise Edition provides these additional Field Validation Types:
Country
Email Address
File
Percentage
Web URL
US Phone Number
US State
US ZIP Code
z Page 411
412
z Page 413
Layout pages are converted into ASPX pages and ASCX controls.
Component properties are combined with the database table bindings to generate the applications middle-tier,
consisting of code-behinds, data validation, and database access logic.
Table bindings are used to generate the database layer, including your applications SQL and stored
procedures.
The application building process
converts layout pages, component
properties, and table bindings into a
three-tier application.
As a final step, Iron Speed Designer runs the VBC compiler (the Visual Basic compiler provided with the .NET
framework) so you have a ready-to-run application to test.
You can inspect all of the generated code from within Iron Speed Designer itself or through the file system. You enjoy
unrestricted access to 100% of the generated code, and there are no run time license fees or special server software
requirements for applications built with Iron Speed Designer.
z Page 414
The current name, location, attributes, and contents of your applications source files, including:
Layout pages
z Page 415
The name, location, and attributes (but not contents) of files in the output directory and its subdirectories.
The hardware, software, and configuration of the non-Iron Speed Designer resources used during generation,
including:
Database servers
During the application building phase, the layout page files are used as the basis for all ASPX pages and ASCX
controls. The HTML layout is used as the basis for creating the pages and controls. When a code generation tag is
encountered, Iron Speed Designer replaces it with a .NET user control corresponding to the code generation tag.
Iron Speed Designer generates user controls that inherit from Microsoft's standard UserControl class. The application
building process also creates Visual Basic code-behind classes for the ASPX pages and ASCX controls. You can also
extend these controls by writing Visual Basic code in the code-behind classes for the page and controls.
In many cases, Iron Speed Designer actually generates more than one user control for each code generation tag.
These additional controls are typically validator controls that enable server-side validation of the data being entered by
an application user.
The layout pages are extensible and may contain any elements of your choosing, including HTML, DHTML, and clientside scripting languages. Iron Speed Designer passes most of these through when generating the ASPX pages,
generating code only for those components provided by Iron Speed Designer.
Running and Deploying Your Application
Once your application is generated, its ready to run. You can either test it on your local development machine or
move it to a testing server or even into production. Since your application is native .NET code, moving it to another
machine is a simple copy and run process, requiring you only to copy the compiled binary code and establish a
virtual directory for your application on your destination machine.
z Page 416
z Page 417
The resulting application folder structure on your production server should be identical to the application folder
structure on your development machine, except for the Source folder, which should not be copied.
Copy:
\<Applications Folder>\*.*
Do not copy:
\<Applications Folder>\Source
You will also need to create the virtual directory if your application is moved from one computer, such as your
development machine, to another, such as your production machine. You do this by creating a virtual directory for
your application in Microsoft IIS, just as you would for any other web-based application you wish to run on your
production server.
Details can be found in:
z Page 418
The Web.config file created for your application contains the database connection settings for accessing the databases
used by your application. These settings allow your application to log into the respective databases. Most likely, you
selected to databases on your local machine or in a test environment when building and testing your application. Now
that you are moving the application into production, you will need to change these settings to point to the production
database system(s).
Edit the database-related keys in your applications Web.config file to point to a different database. You should see an
entry like this:
<add key="DatabaseNorthwind1"
value="Data Source=localhost;
Database=Northwind;
Trusted_Connection=no;
User Id=sa;
Password=sasa"
/>
Leave the key name alone (i.e. don't change "DatabaseNorthwind1"); instead, alter the value as necessary, such as
changing the Data Source.
o
Details on these connection parameters are in the Configuration Files chapter later in this Guide.
z Page 419
We recommend rebooting Microsoft IIS web server in order to use the Windows Registry.
You may put this Registry entry in a file that you can run each time you move an application into production. However,
you need only add this Registry entry once, and not for every deployment.
z Page 420
z Page 421
UTILITY PROGRAMS
This section contains information about:
CompileApplication
LoadStoredProcedures
CompileApplication
The CompileApplication utility program compiles your application. It is generally used as part of the process of
deploying an application to a production server to ensure the application compiles and functions properly in the
production environment.
Usage:
CompileApplication <App Name> <App Directory> <App Name Space>
<App Name> is the applications name.
<App Directory> is the directory where the application is located.
<App Name Space> is the applications name space.
Examples:
CompileApplication MyApp C:\MyApp ParentNS.ChildNS
CompileApplication MyApp "C:\My App" "C:\Program Files\Iron Speed Designer" ParentNS.ChildNS
Before compiling each of the application, CompileApplication copies the BaseClasses.dll, and BaseClasses.pdb from
\<Iron Speed Folder>\IronSpeedBase\Bin
into
\<Application Folder>\bin
of the application to be compiled.
If you are using Microsoft Visual Studio as your compiler, then <App Name Space> is ignored. The application
namespace is taken from the applications .VBPROJ file, for example C:\temp\Tutorial\Tutorial.vbproj:
<Build>
<Settings
z Page 422
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "Tutorial"
AssemblyOriginatorKeyFile = ""
AssemblyOriginatorKeyMode = "None"
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
OptionCompare = "Binary"
OptionExplicit = "On"
OptionStrict = "On"
RootNamespace = "Tutorial"
StartupObject = ""
>
LoadStoredProcedures
The LoadStoredProcedures utility program loads the stored procedures generated by Iron Speed Designer into your
database. This utility is most often used to load stored procedures from your development machine into testing and
production servers. It is generally used as part of the process of deploying an application to a production server to
ensure the application functions properly in the production environment.
If there are tables from different databases in your application, you will need to edit the LoadStoredProcedures batch
file slightly to load the stored procedures to different databases, with potentially different credentials (username /
password / Windows Authentication).
The stored procedure files are typically located in:
\<Application Folder>\StoredProcedures
Usage:
LoadStoredProcedures <Application Name>
<Stored Procedure Directory Name>
<Server Name>
<Database Name>
<Username>
<Password>
z Page 423
Windows 2000
The following procedure is an example of how to create a virtual directory in Microsoft IIS.
z Page 424
z Page 425
z Page 426
z Page 427
Click Finish.
z Page 428
z Page 429
z Page 430
z Page 431
webGarden="false"
cpuMask="0xffffffff"
userName="machine"
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
userName="[user]" is the Microsoft Windows user name used when running ASP.NET applications. If a domain is
not specified, the current machine name is assumed to be the domain name.
There are two special users:
"machine": run the process as a low privilege user account named "ASPNET". (This is the default.)
"SYSTEM": run the process as a local system (high privilege administrator) account.
password="[AutoGenerate | password]" is the password of the designated Microsoft Windows user. Specify
"AutoGenerate" for special users (machine and SYSTEM).
When ASP.NET is running under Microsoft IIS 6 in native mode, the Microsoft IIS 6 process model is used and
settings in this section are ignored. Use the Microsoft IIS administrative user interface to configure process identity
and cycling for the Microsoft IIS worker process for the desired application.
If Microsoft SQL Server is installed on the same machine as your Microsoft IIS web server, you can create a Microsoft
SQL Server login account for the configured Windows user, even if that user is the default <local machine>\ASPNET
user. This allows your applications to connect to Microsoft SQL Server using "Windows authentication". If, however,
Microsoft SQL Server is running on a remote machine, it is not possible to create a Microsoft SQL Server login account
for the <local machine>\ASPNET user because the ASPNET user is not recognized as a valid domain user. It is a
local machine account only. In this case, you will have to reconfigure ASP.NET to run as a valid domain user instead
of the default ASPNET user.
z Page 432
Step 3: If you are using Iron Speed Designer Enterprise edition, you will have to grant db_owner rights to this user on
any databases you plan to reference. This will allow Iron Speed Designer to create stored procedures in those
databases.
You should now be able to connect from Iron Speed Designer to Microsoft SQL Server using Windows Authentication.
z Page 433
Step 5: Select Authentication: SQL Server and Windows or Authentication: Windows and close the dialog. This
configures your Microsoft SQL Server.
You should now be able to connect to Microsoft SQL Server using Microsoft SQL Server Authentication. When
selecting database tables, you must know the specific name and password of the Microsoft SQL Server login that has
the appropriate permissions to read and write to the databases you use.
z Page 434
HTTP Error 403 Forbidden. You are not authorized to view this page
Time out
Problem
Your application will not launch or run from within Iron Speed Designer.
Solution
There are a variety of reasons why a newly created application wont start and run:
Microsoft IIS web server is not installed on your machine. The most common reason an application wont run is
because there is no web server installed on the machine where your application is located. The Microsoft IIS web
server is provided as a Windows component on your Windows operating system CD.
z Page 435
Personal firewall is blocking web server. Check to make sure that your personal firewall is permitting your web
server to run. By default, most personal firewalls do not permit web servers to run on your machine unless you
specifically enable them to run. Typically, you will not be able to start your web server if the personal firewall is
blocking it.
Microsoft IIS web server is stopped (not running). The Microsoft IIS web server is installed on your system, but it
is not running. This means that the web server will not serve up your applications web pages. Microsoft IIS can be
started using the Administrative Tools in the Control Panel.
Your application needs a virtual directory. To run and view your new application, a "virtual directory" must be
created on the web server. A virtual directory is what links the application URL to the physical location of the
application files.
See Creating a Virtual Directory for Your Application for details.
.NET Framework is not properly registered. Your Microsoft .NET Framework may be installed, but not properly
registered or running. For installation and registration details, see Configuring the Microsoft .NET Framework.
z Page 436
Problem
The following error is observed (yellow screen) in an application:
A potentially dangerous Request.Form value was detected from the client
Description
Microsoft .NET Framework 1.1 causes this due to enhanced security features (request validation). Request Validation
has detected a potentially dangerous client input value, and processing of the request has been aborted. This value
may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can
disable request validation by setting validateRequest=false in the Page directive or in the configuration section of
Machine.config. However, it is strongly recommended that your application explicitly check all inputs in this case.
Solution
Modify the ASP.NET settings in
<System Root>\Microsoft.NET\Framework\<versionNumber>\Config\Machine.config
Step 1: Locate Machine.config for Microsoft .NET Framework 1.1.
Step 2: Set the value of validateRequest attribute of pages element to false.
Step 3: Reset the Microsoft IIS web server so that changes in Machine.config take effect.
Please note that this is only a workaround and there may be other security implications.
You can find additional information on the validateRequest at:
http://www.microsoft.com/technet/treeview/default.asp?
url=/technet/prodtechnol/windowsserver2003/proddocs/server/aaconpageselement.asp
true indicates that input from the browser is checked. The default is true.
z Page 437
Problem
The table has a default value for the primary key field that conflicts with the foreign key constraint on the field. This
interferes with the application when it attempts to insert a new record into the database.
Description
The stored procedure generated by Iron Speed Designer relies on default values to be correct. The generated stored
procedure inserts a record into the table with default values (for columns with default values) and supplied values (for
columns without default values). This is immediately followed by updating columns with default values to take the
supplied values. If the insertion fails due to an invalid default value, the Add record operation will fail.
Solution
If you remove the default value in the database, the application can properly create the record.
HTTP Error 403 Forbidden. You are not authorized to view this page
Your .NET Framework is not running. You must set it to run automatically after installing it.
z Page 438
See Verifying the .NET Framework was Installed after Microsoft IIS for details on how to properly install and configure
the .NET Framework so that it runs automatically.
Time out
Problem
It can take a long time to generate an application that uses a large number of tables. As a result, the Iron Speed
Designer pages can time out on your development machine.
Description
The timeout is a .NET feature for recycling deadlocked processes. It defaults to three minutes for the first timeout, and
9 minutes for subsequent timeouts. If Microsoft IIS detects that an HTTP request's response has not been written to
for the specified time, then it recycles the process. These settings are configurable only in Machine.config for
Microsoft IIS 5.0 and apply equally to all applications on the server. Timeouts are configurable in each applications
Web.config file under Microsoft IIS 6.
z Page 439
Solution
To avoid the timeout, modify the response stream with a frequency greater than the deadlock timeout.
There are two .NET configuration settings that control how .NET reacts to (possibly) deadlocked web processes. The
two settings are attributes of the <processModel> element inside the <system.web> section of the Machine.config file.
The settings are:
After changing the interval of both settings to 1 hour and restarting Microsoft IIS, the next web request will initialize
CacheDepot and the build should work normally.
z Page 440
z Page 441
z Page 442
Defines the ASP.NET user account under which Microsoft IIS runs.
Defines the ASP.NET State Service that is used by Microsoft IIS when running .NET applications.
Run the following command sequence to set up your Microsoft IIS web server properly. (aspnet_regiis is a utility
provided as part of the Microsoft .NET framework.)
aspnet_regiis -u
aspnet_regiis -i
The "-u" flag uninstalls the current version of the .NET Framework.
The "-i" flag installs the current version of the .NET Framework.
Additional information can be found at:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-ujs%3B306005
Finally, set the .NET Framework to run automatically:
z Page 443
http://msdn.microsoft.com/library/default.asp?url=/library/enus/wss/wss/_exch2k_running_asp_net_on_a_dc.asp
http://support.microsoft.com/default.aspx?scid=kb%3Ben-ujs%3B318465
Alternatively, you may use another Windows 2000 Server that is not setup as a domain controller.
Adjusting Security Settings in Machine.config
Problems can be caused by the security settings in the ASP.NET user account on the machine itself. One reason for
this is that your Windows 2000 machine is set up as a domain controller.
z Page 444
This Microsoft support link describes the problem and its resolution:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q315158
The solution is to set the userName attribute to SYSTEM in the <processModel> section of the Machine.config file.
Step 1: Locate your machine.config file. For example:
C:\<WINDOWS-DIRECTORY>\Microsoft.NET\Framework\v1.0.3705\CONFIG
(Be sure to use the Machine.config file specific to your active .NET Framework installation.)
Step 2: Change the following attributes in the processModel element to use a Windows domain user.
userName
password
Please note that the password of the Windows domain user needs to be in clear text (not encrypted). Open the
Machine.config file and search for the string processModel. The line you should change looks like:
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
z Page 445
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="60"
webGarden="false"
cpuMask="0xffffffff"
userName="system"
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseRestartDeadlockInterval="00:09:00"
responseDeadlockInterval="00:03:00"
maxWorkerThreads="25"
maxIoThreads="25"/>
userName="[user]" is the Microsoft Windows user name used to run the process. If a domain is not specified, the
current machine name is assumed to be the domain name.
There are several special users:
"SYSTEM": run the process as a local system (high privilege administrator) account.
"Machine": run as the process as a low privilege user account named "ASPNET".
password="[AutoGenerate | password]" is the password of the designated Microsoft Windows user. Specify
"AutoGenerate" for special users (SYSTEM and machine).
http://www.gotdotnet.com/team/changeinfo/default.aspx
z Page 446
For each applications \<APP NAME>\Web.config file and \<APP NAME>\Source\Web.config file, add this tag to
the <System.web> section:
<pages validateRequest="false" />
Note: The applications Web.config file is different from the Iron Speed Designer Web.config file.
Switching to .NET Framework V1.0
To switch to .NET Framework version 1.0, do the following:
copy ...<Iron Speed Folder>\ProjectTemplate\Source\Web1.0.config to
...<Iron Speed Folder>\ProjectTemplate\Source\Web.config
z Page 447
For each applications \<APP NAME>\Web.config file and \<APP NAME>\Source\Web.config file, remove this tag
from the <System.web> section:
<pages validateRequest="false" />
Note: The applications Web.config file is different from the Iron Speed Designer Web.config file.
Restarting ASP.NET State Service
Reset ASP.NET state service default to automatic load on start-up. Open the Windows desktop, right-click on My
Computer and select Manage. This opens the Computer Management Directory Box.
In the left-hand navigation pane, open the Services and Applications directory structure and click on Services. The
right-hand pane will display all of the available services and their current status. Double click on the ASP.NET State
Service to open its properties box and it should open displaying the General tab. On that tab, set the Startup type
z Page 448
dropdown box to automatic and if the Service Status is not started, click on the Start button to start the ASP.NET
State Service. When this has been done click the Apply and OK buttons and close out the Computer Management
Directory Box.
z Page 449
z Page 450
z Page 451
Note: For faster performance, we recommended your application be compiled in Release mode.
Follow these steps to make your application compliant with Microsoft Visual Design.
z Page 452
Generate your application before opening its ASPX files or project solution files in Visual Studio. Iron Speed
Designer updates your applications VBPROJ file each time your application is generated. If you do not first
(re)generate your application, Visual Studio will not be able to find all of the applications files.
Select Build Solution in the Build menu. This will rebuild the SLN solution file. The environment should then
work properly.
Any generated file that is safe for the developer to modify without Iron Speed Designer overwriting the file.
We recommend you place the following files under source code control:
All layout page files. These are the HTML pages containing code generation tags, typically located in:
\<Application Folder>\Source
\<Application Folder>\Source\Images
\<Application Folder>\Source\MyPages
\<Application Folder>\Source\OtherComponents
\<Application Folder>\Source\OtherPages
All properties files. These are XML files containing the component property settings, typically located in:
\<Application Folder>\Source
\<Application Folder>\Source\MyPages
\<Application Folder>\Source\OtherComponents
\<Application Folder>\Source\OtherPages
z Page 453
All table binding files. These are XML files containing the database table bindings (table schemas and foreign
key relationships), typically located in:
\<Application Folder>\Source\DataAccess
All safe class files. These files are typically where you extend the application with code of your own.
Typically located in:
\<Application Folder>\DataAccess
\<Application Folder>\OtherComponents
\<Application Folder>\Pages
All sign in, sign out, and error pages. Typically located in:
\<Application Folder>\OtherComponents
z Page 454
The Personal Web Server installs itself on the first port available starting with port number 8080. There can be only
one copy of the Personal Web Server running at a time. Each time the Personal Web Server runs, it finds the first
available port, so the port number will change from time to time based on the availability of the ports.
Personal Web Server Security
To protect your computer, the Personal Web Server is built to only respond when it is accessed from the local
computer. Remote access from another computer, whether inside or outside the firewall, is disabled at the code level
and cannot be turned on through a configuration setting. Moreover, the only port that is used is the selected port, and
only when accessed from the same computer. From all other computers, the Personal Web Server behaves as if it
does not even exist.
Personal Web Server Virtual Directory Configuration
The Iron Speed Designer Personal Web Server maintains its virtual directory settings in a configuration file. The
configuration file is located in:
<Iron Speed Designer>\PersonalWebServer\PWSApp.exe.config
z Page 455
The configuration file contains information about the port currently being used by the Personal Web Server as well as
the virtual directory names and locations.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="PortNumber" value="8080" />
<add key="/Designer" value="C:\Program Files\Iron Speed Designer\Designer" />
<add key="/TestApp" value="c:\Applications\TestApp" />
</appSettings>
</configuration>
The port number will be the first available open port equal to or greater than 8080. When a new port is selected, the
configuration file is updated.
The virtual directory settings are specified in the file relative to the root directory of the server. For example,
/TestApp is an applications virtual directory and points to the C:\Applications\TestApp folder.
z Page 456
ASP.NET By Example, by Steven A. Smith. This is a good introductory or beginners book about ASP.NET,
web applications, and the differences between ASP and ASP.NET.
ASP.NET Unleashed, by Stephen Walther. This is a good ASP.NET book for intermediate to advanced
readers.
Developing Web Applications with Visual Basic .NET and ASP.NET, by Billy Hollis.
z Page 457
458
Button Panels
z Page 459
Step 1: Create a layout page file for the reusable panel called HeaderPanel.html.
<table width=100% cellpadding="0" cellspacing="0"
style="border-bottom-width: 1; border-bottom-color: #DDDDDD; border-bottom-style: solid">
<tr >
<td><GEN:IMAGE Name="Logo"/></td>
</tr>
</table>
Step 2: In the pages Properties dialog, select the HeaderPanel.html node and change the Type to be a Header
Panel. By default the Type is set to a Page. Selecting any type other than Page will create an ASCX control instead
of an ASPX page.
Tag Property
Setting
File Name
HeaderComponent.html
Type
Header Panel
Page Title
HeaderComponent
Setting
Logo
http://www.ironspeed.com/art/logo.gif
Any URL you wish.
Step 2: In the pages Properties dialog, select the Header code generation tag and change the Type of the tag to a
Header. At this point you can also override the layout page file and point to a different file if desired. This allows you
the flexibility of overriding the panel to point to a different panel.
z Page 460
Tag Property
Setting
Header
Type
Header
Step 3: Build and run the application and view the generated page.
Button Panels
Enhancing applications with standard buttons that do standard things is often a tedious and time-consuming task. Iron
Speed Designer can greatly simplify, and largely automate, this mundane task. For example, Iron Speed Designer
supports four types of buttons. The Push Button, Link Button and Image Buttons create standard HTML buttons based
on the Button, A HRef and IMG HTML tags. A fourth type of button supported by Iron Speed Designer is a button that
is created using HTML layout. This button can be created by specifying an GEN:Use Type=Button tag. Alternatively,
you can also use GEN:Button as an alias for GEN:Use Type=Button.
You can create many different types of buttons using HTML layout and use them on your page. For example, you can
create a Red button and a Green button and use them multiple times on a single page. The button panel file may
contain the complete property settings for the button including the label text, the URL and the command to execute.
By setting the button properties completely, the button actually becomes a specific button and not reusable to create
multiple buttons with different labels, URLs and commands. To allow reusability, Iron Speed Designer supports the
ability to set some properties of the button at the page or panel that incorporates the button.
To create a reusable button:
Step 1: Create two layout page files for a red and a green button.
<!-- red button -->
<style type="text/css">
a{
color: #FFFFFF;
font-family: Verdana;
font-size: 10px;
font-weight: bold;
text-decoration: none;
text-align: center;
z Page 461
padding-left: 3px;
padding-right: 3px;
}
</style>
<table cellpadding="3" cellspacing="0" border="1"
bordercolorlight="#C0C0C0" bordercolordark="#808080"
style="border-collapse: collapse" bgcolor="#FF3300">
<tr>
<td><GEN:LinkButton Name="Button"/></td>
</tr>
</table>
Step 2: Set the Type property to Button Panel for both the red and the green button layout page files.
Tag Property
Setting
File Name
RedButton.html
Type
Button Panel
Page Title
RedButton
z Page 462
Do not set the Button Text, Image file (URL) or Action properties for the Button tag.
Tag Property
Setting
Button
Button Text
Leave unset
Leave unset
Action
Leave unset
Step 3: Create a new layout page that uses these buttons multiple times.
<div align="center">
<table cellpadding="8" cellspacing="0" border="0">
<tr>
<td><GEN:BUTTON Name="PrevButton" FILE="GreenButton.html"/></td>
<td><GEN:BUTTON Name="NextButton" FILE="GreenButton.html"/></td>
<td><GEN:BUTTON Name="OKButton" FILE="GreenButton.html"/></td>
<td><GEN:BUTTON Name="CancelButton" FILE="RedButton.html"/></td>
</tr>
</table>
</div>
Step 4: For each button, set the button text, the button action and URL properties.
Tag Property
Setting
PrevButton
NextButton
OKButton
CancelButton
Button text
Next
Button action
Redirect
Redirect URL
http://www.ironspeed.com
URL of your choosing
None
Step 5: Build and run the application and review the buttons displayed.
z Page 463
Step 2: In the pages Properties dialog, select the MenuItemNormal.html node of the tree and set the layout Type to
Button Panel.
Tag Property
Setting
File Name
MenuItemNormal.html
Type
Button Panel
Page Title
MenuItemNormal
Step 3: Select the Button node of the tree to specify the default properties for the tag. Do not make any changes to
the properties since they will be overridden by the Menu panel.
z Page 464
Step 4: Create a layout page file for the selected menu item. This layout page file defines a generic menu item for the
selected menu item and is only necessary if a different look is to be provided for the current menu or tab. If there is no
difference between the current menu and the other menus, then there is no need for this layout page file.
The name of the code generation tag must be Button. The SelectedMenu style sheet class is specified for displaying
the menu. This class is defined in the Menu layout page file so that it is included only once per page.
<table width=140 height=14 bordercolorlight="#FFFFFF" bordercolordark="#C0C0C0"
border="1" bordercolor="#111111"
cellpadding="0" cellspacing="0" style="border-collapse: collapse">
<tr>
<td class="SelectedMenu" bgcolor="#000080" >
<GEN:LinkButton Name="Button"/>
</td>
</tr>
</table>
Step 5: In the pages Properties dialog, select the MenuItemSelected.html node in the tree and set the layout Type to
Button Panel.
Tag Property
Setting
File Name
MenuItemSelected.html
Type
Button Panel
Page Title
MenuItemSelected
Step 6: Select the Button node of the tree to specify the default properties for the tag. Do not make any changes to
the properties since the Menu panel will override them.
Step 7: Now create a layout page file for the menu for your application. This layout defines the specific menu items
needed in your application. The individual menu items are specified using a GEN:Button code generation tag. If a
different style is required for the selected menu item, then two GEN:Button tags must be used for each menu. Iron
Speed Designer automatically hides one of them based on the currently selected menu item. By convention, the name
of the highlighted menu item must be exactly the same as the normal menu item except for a suffix of Hilited
The styles for the SelectedMenu and NormalMenu classes are specific to the A href HTML tag and are specified here.
One of the most common mistakes developers make is to specify the same style name within each of the panel files.
Browsers do not differentiate between panels since they receive one HTML file. As such, if the same style is defined
multiple times, the last definition is used. This results in the selected and unselected menu items looking similar.
<style type="text/css">
.SelectedMenu a {
color: #FFFF00;
font-family: Verdana;
z Page 465
font-size: 10px;
font-weight: bold;
text-decoration: none;
text-align: center;
padding-left: 3px;
padding-right: 3px;
}
</style>
<style type="text/css">
.NormalMenu a {
color: #FFFFFF;
font-family: Verdana;
font-size: 10px;
font-weight: bold;
text-decoration: none;
text-align: center;
padding-left: 3px;
padding-right: 3px;
}
</style>
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<GEN:BUTTON Name="Customers" File="MenuItemNormal.html"/>
<GEN:BUTTON Name="CustomersHilited" File="MenuItemSelected.html"/>
</td>
</tr>
<tr>
<td>
<GEN:BUTTON Name="Employees" File="MenuItemNormal.html"/>
<GEN:BUTTON Name="EmployeesHilited" File="MenuItemSelected.html"/>
</td>
</tr>
<td>
<GEN:BUTTON Name="Suppliers" File="MenuItemNormal.html"/>
<GEN:BUTTON Name="SuppliersHilited" File="MenuItemSelected.html"/>
</td>
</tr>
<tr>
<td>
<GEN:BUTTON Name="Products" File="MenuItemNormal.html"/>
<GEN:BUTTON Name="ProductsHilited" File="MenuItemSelected.html"/>
</td>
</tr>
z Page 466
</table>
Step 8: In the pages Properties dialog, select the Menu.html layout node and set the Type to Menu Panel.
Tag Property
Setting
File Name
Menu.html
Type
Menu Panel
Page Title
Menu
Step 9: Configure each of the menu item (button) tags and provide the menu text (button text), the button action and
the URL. This must be done for both the normal and the highlighted menu items.
Tag Property
Setting
Customers
CustomersHilited
Button Text
Customers
Action
Redirect
None
Redirect URL
ShowCustomersRecord.aspx
Redirect Parameters
Both normal and highlighted menu items are visible by default when you add them to the layout page file and set their
data binding properties. To hide the highlighted menu items, add a pass-through attribute of "Visible" with the value
"False". Pass-through properties are set on the Properties tab of the tags Properties dialog.
Step 10: Once the menu panel has been created, it can now be incorporated into a page using the GEN:Use code
generation tag. In this example, the PageWithMenu.html layout page file includes the menu panel and the products
from the database.
<GEN:Use Name="Header" File="HeaderPanel.html"/>
<br>
<table>
<tr>
<td valign="top">
<GEN:Use Name="Menu" File="Menu.html" Type="Menu" />
</td>
<td valign="top">
z Page 467
<GEN:Table Name="Products">
<table cellpadding="5" style="border-collapse: collapse" border="1"
bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">
<GEN:ItemTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td>
<GEN:FieldValue Name="ProductId" />
</td>
<td>
<GEN:FieldValue Name="ProductName" />
</td>
<td>
<GEN:FieldValue Name="UnitPrice" />
</td>
<td>
<GEN:FieldValue Name="UnitsInStock" />
</td>
<td>
<GEN:FieldValue Name="Discontinued" />
</td>
</tr>
</GEN:ItemTemplate>
</table>
</GEN:Table>
</td>
</tr>
</table>
Step 11: In addition to the other tags, the Menu panel must also be bound. To highlight a specific menu item, you
must specify the name of the code generation tag that represents the current page. For example, if the current page is
the Show Products Record page and it corresponds to the Products code generation tag, the Highlight Settings must
be set to Products.
By setting the Highlight Settings to the name of the code generation tag that corresponds to the current page, the
application will display the highlighted menu for products and the normal menu for all other menus. The application
performs this by setting the Visible pass-through attribute of the tag to False (to hide the normal menu item) and sets
the highlighted tags Visible pass-through attribute to True. The highlighted tags name is determined by appending a
suffix of Highlighted.
Tag Property
Setting
Highlight Settings
Products
z Page 468
Step 2: In the pages Properties dialog, select the EmployeePanel.html node in the tree and set the Type to User
Control.
Tag Property
Setting
File Name
EmployeePanel.html
Type
User Control
Page Title
EmployeePanel
Step 3: Set the data binding properties for each of the FieldValue tags to the specific fields of the Employee table.
This is the same selection if there is a GEN:Record code generation tag that encloses this field. However, in this case,
z Page 469
the Record tag is not included in this panel layout page file but will instead be provided by the page that includes this
panel.
Tag Property
Setting
No selection
Field
Step 4: Set the data binding properties for each of the FieldValue tags to their specific database tables and fields,
e.g.:
Tag Property
Setting
Photo
Table
Employees
Field
Photo
Display Style
Image
Step 5: Since the images in the Northwind and Southwind databases contain a 78 byte header, you must change the
Offset value on the Properties tab for the Photo code generation tag. The ImageUrlFormat pass-through attribute
contains a URL with the Offset parameter initialized to 0. Change this to 78.
Attribute
Value
Photo
ImageURLFormat
..\ExportFieldValue.aspx?Table=Employees&Field=Photo&Record={0}&Offset=78
Step 6: Set the data binding properties for the other tags to their respective fields from the Employees table.
Step 7: At this point, create a new layout page file called PageWithPanels.html and incorporate the employee panel
just created into this page twice to show two employee records side-by-side. The panel can be incorporated using the
GEN:Use code generation tag. The name of the two tags will be different, but they will both point to the same
EmployeePanel.html file.
<table>
<tr>
<td>
<GEN:Record Name="Employee1">
z Page 470
Step 8: In the PageWithPanels.html layout page, set the properties for the Employee1 Record code generation tag.
Tag Property
Setting
Employee1
Employees
Emp1
Step 9: Set the data binding properties for the Employee2 tag to the get the Employee ID from the Emp2 URL
variable.
Tag Property
Setting
Employee2
Employees
Emp2
Step 10: Set the Type property to User Control for both Employee1Panel and Employee2Panel.
Tag Property
Setting
Employee1Panel
Type
User Control
Tag Property
Setting
Employee2Panel
z Page 471
Tag Property
Setting
Type
User Control
Once created, the EmployeePanel.html can also be used other layout pages.
Step 1: To use the same panel to display a table of employees, create a page called PageWithPanelsInTable.html.
This page uses the GEN:Table tag and the GEN:ItemTemplate code generation tags. The ItemTemplate contains a
reference to the EmployeePanel.html tag using the GEN:Use tag. Note that the layout specifies a single reference to
the employee panel.
<GEN:Table Name="Employees">
<table>
<GEN:ItemTemplate>
<tr>
<td>
<GEN:Use Name="EmployeePanel" File="EmployeePanel.html"/>
</td>
</tr>
</GEN:ItemTemplate>
</table>
</GEN:Table>
Step 2: In the PageWithPanelsInTable.html layout page file, set the data source properties for the Employees Table
tag.
z Page 472
Tag Property
Setting
Employees
Employees
Step 3: Set the Type property to User Control for the EmployeePanel tag.
Tag Property
Setting
EmployeePanel
Type
User Control
z Page 473
On this page, youll note that only four records were displayed. Even as this simple application was created, the
generator created the SQL query for retrieving the table, all the cursor management logic, the pagination logic, etc.
The result is that four records contained in the table were displayed using the custom panel we defined earlier, but we
didnt need to worry about the query, cursors, pagination logic, or hundreds of other development tasks normally
associated with web application development.
Removing the complexity and the sheer amount of work normally associated with reusable software components is
one of Iron Speed Designers key advantages.
z Page 474
z Page 475
In the tutorial example given below, a third-party menu control has been incorporated into the layout HTML page. The
third-party menu control used in this example is from CyberAKT. This third-party menu control allows you to
incorporate many different types of menus into your application with ease. The third-party menu is available at:
http://www.aspnetmenu.com
Some sample menus and tabs available from CyberAKT are shown below:
The ASPNetMenu third-party control works by putting an ASP control in your layout page file and specifying the list of
menu items in a separate XML file. The following steps allow you to integrate an independent third-party control into
pages created with Iron Speed Designer.
Step 1: Create an HTML layout page file for the reusable panel called PageWithThirdPartyMenu.html. Place this file
in a folder called ThirdPartyMenus under the Source folder of your application. This layout page file contains a
@Register directive to register the ASPNetMenu followed by a reference to the control. The DLL for the ASPNetMenu
must be placed in the Bin directory of the application.
<%@ Register TagPrefix="cyberakt" Namespace="CYBERAKT.WebControls.Navigation" Assembly="ASPnetMenu" %>
z Page 476
Step2: Copy MenuData.xml, MenuData.css and the Image subdirectory to the ThirdPartyMenus directory under your
applications folder. (The ThirdPartyMenus directory is not the same folder where you placed the HTML layout page
file. This folder is the folder where the ASPX page is generated).
MenuData.xml is the properties file created by Iron Speed Designer for the PageWithThirdPartyMenu.html layout page.
Iron Speed Designer automatically creates this properties file.
Step 3: Copy the ASPNetMenu.DLL into the Bin directory of the application. The DLL provided with the Tutorial
sample is a trial version DLL and will display an Unlicensed Version message instead of the menu on a random
basis.
Step 4: Build and run the application.
Step 5: Open the page to view the third-party menu.
http://localhost/Tutorial/ThirdPartyMenus/PageWithThirdPartyMenu.aspx
You can modify the MenuData.xml to add or delete menu items and change the URLs pointed to by each of the
individual menu items. Please see the documentation for the ASPNetMenu control for more details on how to
customize this control.
z Page 477
z Page 478
The Tree View displayed in this example is a third-party control built by obout, Inc. They can be found at:
http://www.obout.com
This example for the tree control is based on frames the top frame shows a logo, the bottom frame is split into a left
and right frame. The left frame shows the tree control and the right frame shows the selected node.
This example is built using Visual Basic code in the ASPX page to show how it can be done. You can also create
similar code in the Visual Basic code-behind file if you like.
Step 1: Create the ASPX files necessary to display the frame based window. This file specifies the top frame, a left
side frame and the right frame to display the selection from the left frame. This file is created directly as ASPX pages
and stored in the ThirdPartyTreeView folder under your applications folder.
z Page 479
The ViewFrame.aspx is the main window and it contains references to the top frame and the left and right frame. The
top frame points to ViewHeader.aspx and the left frame of the bottom points to ViewTree.aspx. The right frame is
initially set to blank to not display anything.
<frameset rows="108,*">
<frame name="TopFrame" src="ViewHeader.aspx">
<frameset cols="225,*">
<frame name="TreeFrame" src="ViewTree.aspx">
<frame name="RightFrame" src="">
</frameset>
</frameset>
Step 2: Create the page for the top portion of the frame. The ViewHeader.aspx file is generated by Iron Speed
Designer from a HTML layout page file containing a logo. The HTML layout page is placed in the
Source/ThirdPartyTreeView folder. The body HTML tag is set to no so the header portion does not scroll. Set the
logo tags Image property to an appropriate image.
<body scroll="no">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"
id="AutoNumber1" height="100">
<tr>
<td width="100%">
<GEN:Image Name="Logo"/>
</td>
</tr>
</table>
</body>
Step 3: Create the page to display the tree view on the left frame. This page is created as a HTML layout page file
with Visual Basic code as shown below. A detailed explanation of the contents of the file is provided below.
<link href="/Designer/Styles/Designer.css" type="text/css" rel="stylesheet">
<%@ Import Namespace="obout_ASPTreeView_Pro_NET" %>
<script language="VB" runat="server">
Public Function CreateTree() As String
Dim oTree As New obout_ASPTreeView_Pro_NET.Tree()
oTree.ShowIcons = False
oTree.TreeIcons_Path = "/Designer/Images"
oTree.Add(Nothing, "root", "Products by Categories")
Dim html
Dim catRecords As ArrayList = CategoriesAccess.Instance.GetList( _
Nothing, _
Nothing, _
0, 20, Nothing)
z Page 480
At the bottom of the file, the Tree View is displayed as an ASP:Label as recommended by the developer of the tree
control. The text of the label is specified by the CreateTree function.
<table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"
id="AutoNumber1">
<tr>
<td>
z Page 481
The CreateTree function first initializes the tree control, sets some options and creates the root node of the control as
shown below.
Public Function CreateTree() As String
Dim oTree As New obout_ASPTreeView_Pro_NET.Tree()
oTree.ShowIcons = False
oTree.TreeIcons_Path = "/Designer/Images"
oTree.Add(Nothing, "root", "Products by Categories")
Next, the CreateTree function defines an array of all categories by using the CategoriesAccess class generated by Iron
Speed Designer. This class is generated when you use the Categories table and build the application. There is no
additional filter criteria specified, and as currently implemented, it only retrieves the first 20 records.
Dim catRecords As ArrayList = CategoriesAccess.Instance.GetList( _
Nothing, _
Nothing, _
0, 20, Nothing)
A foreign key is created by specifying the foreign key relationship from the Products table to the Categories table.
Dim prodCatFk As IronSpeed.Base.Data.ForeignKey = _
ProductsAccess.Instance.TableDefinition.GetForeignKey( _
ProductsAccess.Instance.CategoryIDColumn)
Next, the code iterates over the categories records retrieved in the catRecords array list. A category node is added to
the tree control. The parent of this category node is the root node.
Dim catRecord As CategoriesRecord
For Each catRecord In catRecords
Dim catId As String = "catId" & catRecord.GetString(CategoriesAccess.Instance.CategoryIDColumn)
Dim catName As String = catRecord.GetCategoryNameFieldValue()
oTree.Add("root", catId, catName)
The foreign key created earlier is transformed into a filter that can be used to retrieve the products that match this key.
Dim f As New IronSpeed.Base.Data.ForeignKeyValueFilter( _
prodCatFk, _
catRecord.GetID(), _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Equals)
z Page 482
The next step is to create an array list of products for the current category within the For loop. Currently, this list only
shows the first 20 products belonging to the category. You can increase this count to a very large number to retrieve
all products. The GetList function for the RecordAccess class is used to create an array list.
Dim prodRecords As ArrayList = ProductsAccess.Instance.GetList( _
f, _
Nothing, _
0, 20, Nothing)
Dim prodRecord As ProductsRecord
For each of the products found for the category, an HTML link is created and the product is added to the tree with the
parent as the category.
For Each prodRecord In prodRecords
Dim prodId As String = prodRecord.GetString(ProductsAccess.Instance.ProductIDColumn)
Dim prodName As String = prodRecord.GetProductNameFieldValue()
html = "<a href='ShowProductRecord.aspx?Products=" & prodId & "' target='RightFrame'>" & prodName & "</a>"
oTree.Add(catId, "prodId" & prodId, html)
Next
Next
Return oTree.HTML()
End Function
Step 4: Place the ASP Tree View DLLs in the Bin folder of the application. The Tree View uses two DLLs to work.
obout_ASPTreeView_Pro.dll
obout_ASPTreeView_Pro_NET.dll
The DLL names may be different if you purchased a different type of Tree View control from obout, Inc. You will need
to change the example if you purchased a different control. Please see the documentation for the ASP Tree View
control for more details on how to customize this control to display different types of trees.
Step 5: Build and run the application.
Step 6: Open the page to view the third-party tree control.
http://localhost/Tutorial/ThirdPartyTreeControl/ViewFrame.aspx
Please see the documentation for the tree control for more details on how to customize this control.
z Page 483
z Page 484
The User ID stored in the session variable is the value of the database column in the user table for the signed in user.
The actual column used is the one specified as User ID field in the Role-Based Security Wizard.
z Page 485
Page
Templates
Layout
Pages
ASPX
Pages
z Page 486
Page Templates
You can create custom layout pages by hand or you can create some standard pages using page templates provided
with Iron Speed Designer. Several attractive page templates included in Iron Speed Designer give you a choice of
application look-and-feel without having to hand-code the layout pages. These page templates allow you to quickly
generate great looking layout pages for viewing a table of data, or to add, edit and view an individual data record.
Note: Iron Speed Designer Professional Edition comes with a limited set of page templates. Not all page templates
described in this section may be available. Iron Speed Designer Enterprise Edition contains an extended set of page
templates.
The page templates included with Iron Speed Designer allow you to create standard pages such as:
Add Record, Edit Record or Show Record: These pages allow you to create a standard page to add, edit or display
a record. In general, the underlying page layout for each of these templates is exactly the same. The properties set
by the Application Builder determine whether the page is to add, edit or display a record.
Show Table or Edit Table: These pages display multiple records in a table. The underlying page layout for both of
these templates is exactly the same. The properties set as part of the Application Builder determines whether the
page is used to display or edit records.
Design Themes
Each of the page templates provided with Iron Speed Designer follows a design theme a consistent look-and-feel
shared by the page layout and the common elements used across pages such as menu bars, and search, pagination
and filter controls. We often refer to the set of related page templates and components as a design theme. By
convention, the name of the design theme is added as a suffix to the name of the page template. For example, the
Add Record page for the Everest design theme is called AddRecord-Everest.html.
Design themes provided with Iron Speed Designer are named based on some of the worlds tallest mountains. Iron
Speed Designer Professional Edition comes with the Everest and Kilimanjaro design themes. Iron Speed Designer
Enterprise Edition comes with an additional three themes named Matterhorn, McKinley and Shasta. There is also a
theme called Vanilla that is provided in both versions of Iron Speed Designer as a very basic template to use if you are
creating your own design theme. The Vanilla theme is not intended for use to create layout pages for your application.
If you have a standard layout you would like to use across your entire organization, instead of creating each individual
page by hand, you can instead create a page template and let Iron Speed Designer create the individual pages using
the Application Builder.
z Page 487
Following are three examples of the same Show Table page created from page templates rendered with different
design themes.
z Page 488
z Page 489
Panels
Page templates and layout pages within a design theme utilize panels for repetitive page elements that dont change
from page to page. This approach achieves a consistent look and feel across multiple pages with a minimum amount
of work. For example, you only need specify the button look and feel once and use it as a panel in all layout pages
rather than describing the layout for each button within each and every page. These panels are an important part of
the design theme. While there is no requirement to create these elements as panels, we highly recommend them
because it allows you to specify the common elements in a single place. For example, you only need specify the
button look and feel once and use it as a panel in all layout pages rather than describing the layout for each button
within the page. The following panels are automatically provided for each of the page templates provide by Iron Speed
Designer:
Panel
Description
Button
A button based on a layout and the use of a hyperlink for the click action.
Footer
A footer panel used on every page created by the Application Builder. This
panel is initially empty.
Header
The header panel used on every page created by the Application Builder.
This panel typically contains an application logo and a menu.
Menu
A menu panel containing one or more menu items. To add a new menu
items, edit the Menu.html file.
Menu_Item
The layout for an individual menu item. This layout if for the normal display
of the menu item.
Menu_Item_Highlighted
Pagination
Range_Filter
The range filter displays two field filters so the application user can specify a
range for searching. You also need to specify the operators to use for each
of the two filters in the panel.
Search
The search panel including a text box and a button. The page templates can
specify their own text boxes and buttons instead of using a panel.
Table
This is used to refer to a table panel instead of defining the table inline on
the page.
z Page 490
Style Sheets
or
../Images/<Theme Name>/Logo.gif
The absence of a tag in the page template does not impact the creation of the layout page based on the page
template. The missing tag is simply left unbound and there is no impact on code generation.
z Page 491
Page template theme files are comprised of HTML containing code generation tags. In addition to the regular set of
code generation tags, there are a few special code generation tags that are used only in page templates. The special
code generation tags enable the page templates to work with the Application Builder to create a page based on the
page template. The following code generation tags are specific to page templates:
Code Generation Tag
Description
GEN:Template
The GEN:Template tag allows you indicate the type of a page template file. The
type of template is used by the Application Builder to determine the questions to be
asked to create a new HTML layout page file. The Type of the Template tag can
be one of the following.
GEN:ForEach
AddOneRecord
EditOneRecord
EditMultipleRecords
ViewOneRecord
ViewMultipleRecords
Iron Speed Designer allows you to create page templates that can be used as the
initial starting point for an HTML layout page file. The Application Builder assists
you in creating an HTML layout page file based on a page template. Since Iron
Speed Designer does not know the exact number of fields or filters you intend to
have on a page, it uses a GEN:ForEach tag to specify a generic layout that can be
repeated multiple times once the Application Builder determines how many times it
must be expanded.
The name of the ForEach tag is used by the Application Builder to determine the
type of the expansion to perform.
z Page 492
Description
GEN:Group
The GEN:Group tag allows you to group a number of code generation tags. The
group is displayed as a node in the tree control of the pages Properties dialog to
easily identify the set of tags enclosed in the group.
The Group tag has no properties and does not generate any code.
GEN:Align
The GEN:Align tag allows the Application Builder to specify an alignment attribute
to the TD HTML tag. The alignment option is set on one of steps in the Application
Builder for each field and by default it is set to be left aligned.
Iron Speed Designer includes a simple set of page template files called Vanilla. These page template files are
provided as a starting point for creating your own page templates.
For more detail, see:
z Page 493
z Page 494
<td>
<GEN:Button Name="ButtonBar" file="../OtherComponents/Button-Vanilla.html" /></td>
</GEN:ForEach>
</tr>
</table>
<!-- End Button Bar Table for One-To-Many -->
<!-- Start Actual One-To-Many Table -->
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<GEN:Table Name="Table">
<!-- Start One-To-Many Table Header Row -->
<tr>
<GEN:ForEach Name="HeaderRow">
<td><GEN:FieldLabel Name="FieldLabel" /></td>
</GEN:ForEach>
</tr>
<!-- End One-To-Many Table Header Row -->
<GEN:ItemTemplate Name="RecordRow">
<!-- Start One-To-Many Record Row -->
<tr>
<GEN:ForEach name="RecordRow">
<td <GEN:Align Name="AlignTableFieldValue" />><GEN:FieldValue name="TableFieldValue" /></td>
</GEN:ForEach>
</tr>
<!-- End One-To-Many Record Row -->
</GEN:ItemTemplate>
</GEN:Table>
<%= Me.SystemUtils.GenerateEnterKeyCaptureEndTag(Me.FindControl("V_ForEachButtonBar1Button")) %>
</table>
<!-- End Actual One-To-Many Table -->
<!-- End of "1" One-To-Many Table View -->
</td>
</tr>
</GEN:ForEach>
<tr>
<td>
<!-- Start Dialog Buttons (Ok and Cancel) -->
<table align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<GEN:Button Name="OKButton" file="../OtherComponents/Button-Vanilla.html" /></td>
<td><img src="../Images/Vanilla/space.gif" height="6" width="3" alt=""></td>
<td>
<GEN:Button Name="CancelButton" file="../OtherComponents/Button-Vanilla.html" /></td>
</tr>
z Page 495
</table>
<!-- End Dialog Buttons (Ok and Cancel) -->
</td>
</tr>
</table>
</td>
</tr>
</table>
</GEN:Record>
</td>
</tr>
</table>
<!-- End Record Table -->
<!-- Start Footer Table -->
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<GEN:Footer Name="Footer" file="../OtherComponents/Footer-Vanilla.html" />
</td>
</tr>
</table>
<!-- End Footer Table -->
<!-- End AddRecord-Vanilla.html -->
The first tag in the file is the GEN:Template tag. The Type of this tag determines the type of template. The Application
Builder requires the presence of the tag to identify this file as a page template file.
<GEN:Template Type="AddOneRecord" />
Following the Template code generation tag, the template may include one or more tags that include the image and
the menu. The Application Builder expects a code generation tag called Logo and it uses this information to set the
logo image file to this tag in the properties file.
Similarly the GEN:Menu code generation tag refers to a menu layout component. The name of this tag in the page
template must be called Menu in order to be bound to the menu.
<GEN:Image Name="Logo" />
<GEN:Menu Name="Menu" file="../OtherComponents/Menu-Vanilla.html" />
The GEN:Record tag with the name as Record is set to the correspond to the table for which the record is being
added, edited or shown. If an Edit Record or Show Record page is being created, the name of the table is also used
to create a URL parameter to retrieve the Id of the record.
<GEN:Record Name="Record">
z Page 496
The DialogIcon and DialogTitle tags are Image and HTML code generation tags respectively. These tags are set
automatically to the icon_edit.gif image in the \Images\<Design Theme> folder. Similarly, the GEN:Html tag
specifies the default dialog title and is automatically initialized to the name of the file.
<GEN:Image Name="DialogIcon" /><GEN:Html Name="DialogTitle" />
The most important set of tags in this template are the ForEach, FieldLabel and FieldValue tags. The Application
Builder asks you to select all the fields to include on the layout page file created by the Application Builder. The
beginning and ending ForEach tags are completely removed from the layout page file created and all the HTML and
code generation tags within the ForEach tags are expanded and repeated as many times as the number of fields
specified in the Application Builder.
<GEN:ForEach Name="Record">
<GEN:FieldLabel Name="FieldValueLabel" />
<GEN:FieldValue Name="FieldValue" />
</GEN:ForEach>
Each repeated FieldLabel tag is given its own name by adding the name of the field as a prefix. For example, if the
field name is FirstName, the FieldValue tag is called FirstNameFieldValueLabel. A similar repetition is performed on
the FieldValue tag and the name of the tag is derived from adding the field name as a prefix to the name of the
FieldValue tag.
The FieldLabel tag is set to a generic label that specifies that the text label of the field is retrieved based on the Display
name you specify on the user interface. This is specified by using the variable %ISD_DEFAULT%. For example, the
label for the Company Name field of the Customers table is initialized to:
%ISD_DEFAULT%Customers%CompanyName
This makes it easy for you to change the label across all the pages by simply changing the Display text for the field on
the Databases tab.
After the set of FieldLabel and FieldValue pairs, the page template allows you to specify master-detail (parent-child)
tables to be added, edited or displayed for the page templates.
<GEN:ForEach Name="OneToManyTable">
<GEN:ForEach Name="ButtonBar">
<GEN:Button Name="ButtonBar" file="../OtherComponents/Button-Vanilla.html" /></td>
</GEN:ForEach>
<GEN:Table Name="Table">
<GEN:ForEach Name="HeaderRow">
<GEN:FieldLabel Name="FieldLabel" />
</GEN:ForEach>
z Page 497
<GEN:ItemTemplate Name="RecordRow">
<GEN:ForEach name="RecordRow">
<td <GEN:Align Name="AlignTableFieldValue" />>
<GEN:FieldValue name="TableFieldValue" />
</GEN:ForEach>
</GEN:ItemTemplate>
</GEN:Table>
</GEN:ForEach>
Since there can be zero or more master-detail tables, a ForEach code generation tag is used to enclose these
contents of each of the detail tables. Within each detail table, there can be zero or more buttons specified. The
ButtonBar ForEach code generation tag indicates the set of buttons to display.
The next section contains the code generation tags for the table itself. First the table header is defined followed by an
ItemTemplate to describe each row of the table. Included in the row is a Align code generation tag that allows the
Application Builder to create an alignment attribute for the TD HTML tag. The Align tag can only be used in page
templates.
As mentioned before, the naming of the code generation tag is important in page templates. These names are used
by the New Page Templates to map to the fields from the database or buttons.
<GEN:Button Name="OKButton" file="../OtherComponents/Button-Vanilla.html" />
<GEN:Button Name="CancelButton" file="../OtherComponents/Button-Vanilla.html" />
The record page templates contain a set of buttons to save or cancel the page. In some cases such as the Show
Record page template, only the OK button is specified since there is no need to save anything from that page. The
Application Builder will provide the appropriate property settings for the buttons based on their name in the page
template.
<GEN:Footer Name="Footer" file="../OtherComponents/Footer-Vanilla.html" />
Finally, each layout page from a page template contains a footer component. A blank footer component is created as
part of each page. You can enhance this footer component to include a copyright notice or other information at the
bottom of each page created using page templates.
z Page 498
z Page 499
<tr>
<td>
<%= Me.SystemUtils.GenerateEnterKeyCaptureBeginTag(Me.FindControl("V_FilterButton")) %>
<table cellspacing="0" cellpadding="0" border="0">
<GEN:ForEach Name="FieldFilterBar">
<tr>
<td width="70"><GEN:FieldLabel Name="FieldFilterLabel" /></td>
<td><GEN:FieldFilter Name="FieldFilter" /></td>
</tr>
</GEN:ForEach>
</table>
<%= Me.SystemUtils.GenerateEnterKeyCaptureEndTag(Me.FindControl("V_FilterButton")) %>
</td>
<td><GEN:Button Name="FilterButton" file="../OtherComponents/Button-Vanilla.html" /></td>
</tr>
</table>
<!-- End Filter Component Table -->
<!-- Category, Pagination and Table View -->
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td>
<%= Me.SystemUtils.GenerateEnterKeyCaptureBeginTag(Me.FindControl("V_ForEachButtonBar1Button")) %>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<GEN:Group Name="CategoryGroup">
<tr>
<td colspan="100">
<!-- Start Category Filter Component Table -->
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><GEN:CategoryFilter Name="CategoryFilter" /></td>
</tr>
</table>
<!-- End Category Filter Component Table -->
</td>
</tr>
</GEN:Group>
<tr>
<td colspan="100">
<!-- Start Pagination Component Table -->
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><GEN:Pagination Name="Pagination" file="../OtherComponents/Pagination-Vanilla.html" /></td>
z Page 500
</tr>
</table>
<!-- End Pagination Component Table -->
</td>
</tr>
<!-- Start Actual Table View -->
<GEN:Table Name="Table">
<!-- Start Table Header Row -->
<tr>
<td colspan="3"><img src="../Images/Vanilla/space.gif" height="1" width="1" alt=""></td>
<GEN:ForEach Name="HeaderRow">
<td><GEN:FieldLabel Name="FieldLabel" /></td>
</GEN:ForEach>
</tr>
<!-- End Table Header Row -->
<!-- Start Table Record Row -->
<GEN:ItemTemplate Name="RecordRow">
<tr>
<td width="1"><GEN:ImageButton name="RecordRowEditButton" /></td>
<td width="1"><GEN:ImageButton name="RecordRowViewButton" file="../OtherComponents/Button-Vanilla.html"
/></td>
<td width="1"><GEN:Selection name="RecordRowSelection" Type="Single" /></td>
<GEN:ForEach name="RecordRow">
<td <GEN:Align Name="AlignTableFieldValue" />><GEN:FieldValue name="TableFieldValue" /></td>
</GEN:ForEach>
</tr>
</GEN:ItemTemplate>
<!-- End Table Record Row -->
<GEN:Group Name="PageTotalRow">
<!-- Start Page Total Row -->
<tr>
<td width="48" colspan="3">Page Total:</td>
<GEN:ForEach name="PageTotalRow">
<td <GEN:Align Name="AlignPageTotal" />><GEN:FieldStatistic name="PageTotal" Type="CurrentPage" /></td>
</GEN:ForEach>
</tr>
<!-- End Page Total Row -->
</GEN:Group>
<GEN:Group Name="GrandTotalGroup">
<!-- Start Grand Total Row -->
<tr>
<td width="48" colspan="3">Grand Total:</td>
<GEN:ForEach name="GrandTotalRow">
z Page 501
The first tag in the file is the GEN:Template tag. The Type of this tag determines the type of template. The Application
Builder requires the presence of the tag to identify this file as a page template file.
<GEN:Template Type="ViewMultipleRecords" />
Following the Template code generation tag, the template may include one or more tags that include the image and
the menu. The Application Builder expects a code generation tag called Logo and it uses this information to set the
logo image file to this tag in the properties file.
Similarly the GEN:Menu code generation tag refers to a menu layout component. The name of this tag in the page
template must be called Menu in order to be bound to the menu.
<GEN:Image Name="Logo" />
<GEN:Menu Name="Menu" file="../OtherComponents/Menu-Vanilla.html" />
Each table view may contain a series of buttons at the top. The New, Edit, and Delete buttons are automatically
created for each table view. These buttons must be later associated with pages provided by you. These buttons are
created in a button bar and are composite buttons based on the Button code generation tag.
<GEN:ForEach Name="ButtonBar">
z Page 502
One of the most powerful features of Iron Speed Designer is the ability to create an advanced search control with
minimal effort. The search control is comprised of a text box and a button to begin the search. The two controls are
enclosed within a group. The entire group is removed from the layout if you do not request a search capability on the
HTML layout page you are creating through the Application Builder. The generated search control will be surrounded
by a capture block to capture the Enter key. This Enter Key capture block was described earlier in this document.
<GEN:Group Name="SearchGroup">
<!-- Start Search Component Table -->
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td>Search for:
<%= Me.SystemUtils.GenerateEnterKeyCaptureBeginTag(Me.FindControl("V_SearchButton")) %>
<GEN:SearchFilter name="SearchArea" />
<%= Me.SystemUtils.GenerateEnterKeyCaptureEndTag(Me.FindControl("V_SearchButton")) %></td>
<td><GEN:Button name="SearchButton" file="../OtherComponents/Button-Vanilla.html" /></td>
</tr>
</table>
<!-- End Search Component Table -->
</GEN:Group>
The filter bar contains a series of filters and one filter button that will start the filtering process. Each filter layout
includes a label for the filter and the filter itself.
The filter button is only included in the layout if there is at least one filter control that is based on a text box. If all filters
are dropdown or check box filters, then there is no Go button generated in the layout page file.
You can also create a filter that specifies a range filter by including two filters. For example, you can create a set of
two date filters. Both filters are displayed as text boxes. The first filter uses a comparison operator of >= and the
second one uses <=. This allows you to specify a date range that you can use to limit the set of records displayed
within a table.
<GEN:ForEach Name="FieldFilterBar">
<tr>
<td width="70"><GEN:FieldLabel Name="FieldFilterLabel" /></td>
<td><GEN:FieldFilter Name="FieldFilter" /></td>
</tr>
</GEN:ForEach>
<td><GEN:Button Name="FilterButton" file="../OtherComponents/Button-Vanilla.html" /></td>
The Category filter displays a hierarchical categorization display similar to Yahoo-style categorization. You can select
one or more fields to categorize on the Application Builder.
The CategoryGroup is excluded completely if no fields are selected for categorization.
<GEN:Group Name="CategoryGroup">
z Page 503
<tr>
<td colspan="100">
<!-- Start Category Filter Component Table -->
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><GEN:CategoryFilter Name="CategoryFilter" /></td>
</tr>
</table>
<!-- End Category Filter Component Table -->
</td>
</tr>
</GEN:Group>
The Pagination tag is a reference to a panel. This tag is an alias for GEN:Use Type=Pagination tag. The pagination
panel contains the specific buttons for next, previous, first, last, etc.
<td><GEN:Pagination Name="Pagination" file="../OtherComponents/Pagination-Vanilla.html" /></td>
The table itself allows the display of column headers, and page and grand totals in addition to the rows of a table. The
table may also contain a button bar.
Each table can contain zero or more buttons specified. The ButtonBar ForEach code generation tag indicates the set
of buttons to display.
After the button bar, a table header is defined followed by an ItemTemplate to describe each row of the table. Each
row in the table contains image buttons for editing and displaying the record. In addition to the image buttons, the
record also contains a selection radio button that can be used to designate the current record to select when a button
on the button bar is pressed. This is used by all the buttons on the button bar such as Edit, Show and Delete.
Included in the row is a Align code generation tag that allows the Application Builder to create an alignment attribute
for the TD HTML tag. The Align tag can only be used in page templates.
The PageTotalRow group is eliminated completely if you do not select page totals for any of the fields to be displayed
in the table. The GrandTotalRow works similarly to the PageTotalRow tag.
<GEN:Table Name="Table">
<!-- Start Table Header Row -->
<tr>
<td colspan="3"><img src="../Images/Vanilla/space.gif" height="1" width="1" alt=""></td>
<GEN:ForEach Name="HeaderRow">
<td><GEN:FieldLabel Name="FieldLabel" /></td>
</GEN:ForEach>
</tr>
<!-- End Table Header Row -->
<!-- Start Table Record Row -->
<GEN:ItemTemplate Name="RecordRow">
z Page 504
<tr>
<td width="1"><GEN:ImageButton name="RecordRowEditButton" /></td>
<td width="1"><GEN:ImageButton name="RecordRowViewButton" file="../OtherComponents/Button-Vanilla.html"
/></td>
<td width="1"><GEN:Selection name="RecordRowSelection" Type="Single" /></td>
<GEN:ForEach name="RecordRow">
<td <GEN:Align Name="AlignTableFieldValue" />><GEN:FieldValue name="TableFieldValue" /></td>
</GEN:ForEach>
</tr>
</GEN:ItemTemplate>
<!-- End Table Record Row -->
<GEN:Group Name="PageTotalRow">
<!-- Start Page Total Row -->
<tr>
<td width="48" colspan="3">Page Total:</td>
<GEN:ForEach name="PageTotalRow">
<td <GEN:Align Name="AlignPageTotal" />><GEN:FieldStatistic name="PageTotal" Type="CurrentPage" /></td>
</GEN:ForEach>
</tr>
<!-- End Page Total Row -->
</GEN:Group>
<GEN:Group Name="GrandTotalGroup">
<!-- Start Grand Total Row -->
<tr>
<td width="48" colspan="3">Grand Total:</td>
<GEN:ForEach name="GrandTotalRow">
<td <GEN:Align Name="AlignGrandTotal" />><GEN:FieldStatistic name="GrandTotal" Type="AllPages" /></td>
</GEN:ForEach>
</tr>
<!-- End Grand Total Row -->
</GEN:Group>
</GEN:Table>
Finally, each layout page from a page template contains a footer component. A blank footer component is created as
part of each page. You can enhance this footer component to include a copyright notice or other information at the
bottom of each page created using page templates.
<GEN:Footer Name="Footer" file="../OtherComponents/Footer-Vanilla.html" />
As mentioned before, the naming of the code generation tag is important in page templates. These names are used
by the New Page Templates to map to the fields from the database or buttons.
Style Sheets
Iron Speed Designer page templates use a Cascading Style Sheet (CSS) style file (Style.css) to specify the styles
used for various HTML tags. In some cases, Iron Speed Designer generates the various HTML controls needed to
z Page 505
collect data from the user. For example, Iron Speed Designer generates all of the input fields, such as text boxes and
dropdowns, and the style cannot be specified for these in the design theme file since the text box is generated by
Iron Speed Designer at run-time. As such, these styles are specified as pass-through attributes for each of the
editable fields.
There is a set of standard styles that Iron Speed Designer uses for the input fields. You can specify the look and feel
of these styles in the design theme styles file. If no style is specified, the default style of the browser is used. Every
design theme can have a Style file to give a standard look-and-feel to the page templates derived from the design
theme.
The same class names are used for all the design themes provided by Iron Speed Designer. As such, switching
between design themes is easier because the developer has to maintain the same set of styles in the CSS file. You
can also create and use any other styles you want to use in the themes. However please note that when a theme
change is performed, the Master style sheet overwrites the current Style.css. Be sure to preserve your design theme
changes prior to switching Style.css files.
Style
Description
field_input
This CssClass is specified for all text box fields used by the Add or Edit Record or the
text boxes on the Edit Table page templates.
z Page 506
z Page 507
z Page 508
509
z Page 510
Paging and Sorting in the Database Tier vs. Middle Tier ............................................................................138
Setting the Sort Order for a Table Component ............................................................................................139
Customizing the Sort Order of Table Components......................................................................................140
Audit Trails and Use Tracking ...........................................................................................................................141
Adding an Audit Trail....................................................................................................................................141
z Page 511
Displaying Data
Advanced Pages
Dashboard Pages
Displaying Tables
Advanced Tables
z Page 512
DISPLAYING DATA
This section contains these examples:
Display a Record
Display a Record
This basic example displays several fields from a database table on a web page. An HTML layout page is created with
one FieldValue code generation tag for each database field to be displayed. This example illustrates:
1. How the FieldValue tag one of the most-used code generation tags is used to display data at any location
within your web page.
2. How several related FieldValue tags are bound to their underlying data sources a single database table in
this example.
3. How the Record code generation tag is used to group related FieldValue tags together for the purpose of
displaying multiple fields from a single selected database record.
Description
Attribute
Description
DisplayRecord.html
Properties File
DisplayRecord.xml
z Page 513
Generated Page
Procedure
Step 1: Set the properties for the Product tag.
z Page 514
Tag Property
Setting
Product
Products
Product
The ID of the product will be supplied on the URL as a value for the Product query string parameter.
Step 2: Set the data binding properties for each of the FieldValue tags to their respective fields by selecting the table
and field name.
For the individual FieldValue tags, select each of the ProductID, ProductName, UnitPrice and UnitsInStock and
select the appropriate database field from the Products table to display. If the name of the code generation tag is the
same as the field name of the enclosing record, the Properties dialog automatically selects the field as a convenience.
The automatic selection occurs when you select each of the code generation tags.
Step 3: Build the application.
Step 4: Open a new browser and enter this URL to display the page:
http://localhost/Tutorial/Tutorial%20Pages/DisplayRecord.aspx?Product=1
Product is the query string parameter and the value 1 is the primary key value of the specific Product record to be
selected and displayed.
Description
DisplayCheckbox.html
Properties File
DisplayCheckbox.xml
z Page 515
Attribute
Description
Generated Page
z Page 516
Procedure
Step 1: Set the display style property for the Discontinued field.
Tag Property
Setting
Discontinued
Display Style
Check Box
For the individual FieldValue tags, select each of the ProductID, ProductName, UnitPrice and UnitsInStock and
select the appropriate database field from the Products table to display. If the name of the code generation tag is the
same as the field name of the enclosing record, the Properties dialog automatically selects the field as a convenience.
The automatic selection occurs when you select each of the code generation tags.
Step 2: Build the application.
Step 3: Open a new browser and enter this URL to display the page:
http://localhost/Tutorial/Tutorial%20Pages/DisplayCheckbox.aspx?Product=5
Product is the query string parameter and the value 5 is the primary key value of the specific Product record to be
selected and displayed.
z Page 517
Description
DisplayRadiobuttons.html
Properties File
DisplayRadiobuttons.xml
Generated Page
z Page 518
Procedure
Step 1: Set the Display Style property to Radio Button List. If the Create from Database checkbox is selected,
Boolean data types will display three radio buttons for True, False and Null value. To specify only two values, select
the Specify Items option and enter Yes and No as the two values. The order of the values does not matter.
Tag Property
Setting
Discontinued
Display Style
Specify items
Yes
No
For the individual FieldValue tags, select each of the ProductID, ProductName, UnitPrice and UnitsInStock and
select the appropriate database field from the Products table to display. If the name of the code generation tag is the
same as the field name of the enclosing record, the Properties dialog automatically selects the field as a convenience.
The automatic selection occurs when you select each of the code generation tags.
Step 2: Build the application.
z Page 519
Step 3: Open a new browser and enter this URL to display the page:
http://localhost/Tutorial/Tutorial%20Pages/DisplayRadiobuttons.aspx?Product=5
Product is the query string parameter and the value 5 is the primary key value of the specific Product record to be
selected and displayed.
Description
DisplayDropdown.html
Properties File
DisplayDropdown.xml
Generated Page
z Page 520
Procedure
Step 1: Set the Display Style property to Dropdown List. If the Create from Database checkbox is selected,
Boolean data types will display three choices for True, False and Null (Please select) value. To specify only two
values, select the Specify Items option and enter Yes and No as the two values. The order of the values does not
matter.
Tag Property
Setting
Discontinued
z Page 521
Tag Property
Setting
Display Style
Dropdown List
Specify items
Selected
Yes
No
For the individual FieldValue tags, select each of the ProductID, ProductName, UnitPrice and UnitsInStock and
select the appropriate database field from the Products table to display. If the name of the code generation tag is the
same as the field name of the enclosing record, the Properties dialog automatically selects the field as a convenience.
The automatic selection occurs when you select each of the code generation tags.
Step 2: Build the application.
Step 3: Open a new browser and enter this URL to display the page:
http://localhost/Tutorial/Tutorial%20Pages/DisplayDropdown.aspx?Product=5
Product is the query string parameter and the value 5 is the primary key value of the specific Product record to be
selected and displayed.
Description
EmployeePhoto.html
Properties File
EmployeePhoto.xml
z Page 522
Generated Page
z Page 523
<GEN:FieldValue Name="Photo"/>
</td>
</tr>
</GEN:ItemTemplate>
</table>
</GEN:Table>
</div>
Procedure
Step 1: Select the Employees table and the appropriate fields for the First Name and Last Name.
Step 2: Set the Display Style property to Image for the Photo field.
Tag Property
Setting
Photo
Display Style
Image
Step 3: Select the Properties tab and modify a pass-through attribute called ImageUrlFormat. Since the image is
stored as a binary field in Microsoft SQL Server, the generation application must return the binary data as a stream of
data instead of specifying a static file in the HTML IMG tag. This is accomplished by a special ASPX page written by
Iron Speed engineers to display the image from a database. This page is in the applications directory and must be
used in the ImageUrlFormat pass-through attribute. The ImageUrlFormat attribute is automatically initialized to:
..\ExportFieldValue.aspx?Table=Employees&Field=Photo&Record={0}&Offset=0
This format indicates to Iron Speed Designer to use the ExportFieldValue.aspx page in your application directory as
the program to display the image.
..\ExportFieldValue.aspx?Table=Employees&Field=Photo&Record={0}&Offset=78
The Offset must be changed to 78 because the Northwind database and its copy Southwind contain a 78-byte header.
This header is an OLE DB header that was placed by Microsoft. Images stored by you may not have a header or may
have a smaller or larger header. The Offset indicates the size of the header.
Step 4: Build the application.
Step 5: Open a new browser and enter this URL to display the page:
http://localhost/Tutorial/Tutorial Pages/EmployeePhoto.aspx
z Page 524
Description
EmployeePhotoURL.html
Properties File
EmployeePhotoURL.xml
Generated Page
z Page 525
<GEN:Table Name="Employees">
<table cellpadding="5" style="border-collapse: collapse" border="1" bordercolorlight="#C0C0C0"
bordercolordark="#C0C0C0">
<GEN:ItemTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td>
<GEN:FieldValue Name="FirstName" /> <GEN:FieldValue Name="LastName" />
</td>
<td>
<GEN:FieldValue Name="PhotoPath"/>
</td>
</tr>
</GEN:ItemTemplate>
</table>
</GEN:Table>
</div>
Procedure
Step 1: Select the Employees table and the appropriate fields for the First Name, Last Name and Photo Path.
Step 2: Set the Display Style property to Literal for the PhotoPath tag.
Tag Property
Setting
PhotoPath
Display Style
Literal
Step 3: In the Properties dialog, select the Properties tab and enter a pass-through attribute called TextFormat.
The TextFormat specifies how the value must be displayed.
Attribute
Value
PhotoPath
TextFormat
<img src=../Pictures/{0}/>
The value of the field is indicated by a replacement parameter {0}. To display the field value as an image, specify
TextFormat as:
<img src=../Pictures/{0}/>
This indicates the value must be displayed as part of an HTML IMG tag. The location of the image is specified as
the Pictures folder.
z Page 526
z Page 527
Description
EditRecord.html
Properties File
EditRecord.xml
Generated Page
z Page 528
Procedure
Step 1: Set the display style property of the editable fields to Text Box.
z Page 529
Tag Property
Setting
ProductName
UnitsInStock
UnitPrice
Display Style
Text Box
Note that the Product ID field will continue to be specified as a Literal because we cannot change the ID of a record
during editing.
Step 2: Set the OK buttons properties.
Tag Property
Setting
OK
Button Text
Action
Update Data
This indicates to the application that data must be added or updated in the
database.
Page
This indicates that all records on the page must be updated.
Redirect URL
Setting
Cancel
Button Text
Cancel
z Page 530
Tag Property
Setting
False
We do not any validation performed upon cancellation.
Action
Refresh Data
None
No control is consuming the event generated by this button.
Redirect URL
URL of the page you wish to return to if the user presses this button.
Redirect Parameters
Step 4: Build the application.
Step 5: Open a new browser and enter this URL to display the page:
http://localhost/Tutorial/Tutorial%20Pages/EditRecord.aspx?Product=1
Product is the query string parameter and the value 1 is the primary key value of the specific Product record to be
selected and displayed.
Description
AddRecord.html
Properties File
AddRecord.xml
z Page 531
Generated Page
z Page 532
</tr>
</table>
</GEN:Record>
<GEN:PushButton Name="OK"/>
<GEN:PushButton Name="Cancel"/>
</div>
Procedure
Step 1: Specify the Data Source for the Record tag as Add new record to database. Select the Products table to
indicate that a product will be added.
Step 2: Set the display style property of the editable fields to Text Box.
Tag Property
Setting
ProductName
UnitsInStock
UnitPrice
Display Style
Text Box
Note that the Product ID field will continue to be specified as a Literal because the ID will automatically be assigned
by the database.
Step 3: Set the OK buttons properties.
Tag Property
Setting
OK
Button Text
Action
Update Data
This indicates to the application that data must be added or updated in
the database.
Page
Indicates that all records on the page must be updated.
z Page 533
Tag Property
Setting
Redirect URL
Redirect Parameters
Step 4: Set the Cancel buttons properties.
Tag Property
Setting
Cancel
Button Text
Cancel
False
We do not any validation performed upon cancellation.
Action
Refresh Data
None
No control is consuming the event generated by this button.
Redirect URL
URL of the page you wish to return to if the user presses this button.
Redirect Parameters
Step 5: Build the application.
Step 6: Open a new browser and enter this URL to display the page:
http://localhost/Tutorial/Tutorial%20Pages/AddRecord.aspx
z Page 534
DISPLAYING TABLES
This section contains these examples:
Description
TableDisplay.html
Properties File
TableDisplay.xml
z Page 535
Generated Page
z Page 536
</table>
</GEN:Table>
</div>
Procedure
Step 1: Set the data binding properties for the Properties tag.
Tag Property
Setting
Products
Products
20
Step 2: Set the data binding properties for the FieldValue tags as they were set in earlier examples.
Step 3: Build the application.
Step 4: Open a new browser and enter this URL to display the page:
http://localhost/Tutorial/Tutorial%20Pages/TableDisplay.aspx
There is no need to specify a query string parameter since all of the products from a table are being displayed instead
of a specific table.
Description
TableSearch.html
Properties File
TableSearch.xml
z Page 537
Generated Page
Procedure
There have to be three event hookups done for the search control to work correctly:
z Page 538
Step 1: Hook up the search button to inform the search text control when the button is clicked. Go to the Event
tab in the Properties dialog and select the Event Producer as Search and the Event Consumer control as
SearchTextBox.
Step 2: Hook up the search text box to inform the table to update itself based on the search criteria. Go to the Event
tab in the Properties dialog and select the Event Producer as SearchTextBox and the Event Consumer control as
Products.
Step 3: (Optional). If you intend to programmatically change the search control when the table is updated, then the
products table must also be hooked up to the search text box. Go to the Event tab in the Properties dialog and select
the Event Producer as Products and the Event Consumer control SearchTextBox.
Step 4: Build and run the application.
Procedure
Step 1: Add code generation tags as shown in the layout page file.
Step 2: Set the data binding properties for the Start Date filter.
Tag Property
Setting
OrderDateFilterStart
z Page 539
Tag Property
Setting
Orders
Field
OrderDate
Operator
Yes
Display Style
Text Box
Step 3: Set the data binding properties for the End Date filter.
Tag Property
Setting
OrderDateFilterEnd
Orders
Field
OrderDate
Operator
Yes
Display Style
Text Box
Step 4: Set the "Go" buttons properties (FilterButton code generation tag).
Tag Property
Setting
FilterButton
Button Text
Go
Search
Parent Table
Redirect URL
z Page 540
Tag Property
Setting
Redirect Parameters
Step 5: Bind the events on the page. Select the Page node (highest node - i.e. the root node) on the tree and add the
following producer/consumer pairs:
Producer
Consumer
FilterButton.V_Button
OrderDateFilterStart
For FilterButton.V_Button, make sure to enter this in the "Or enter a custom
event consumer" field.
FilterButton.V_Button
OrderDateFilterEnd
OrderDateFilterStart
Table
OrderDateFilterEnd
Table
Table
OrderDateFilterStart
Table
OrderDateFilterEnd
Description
TableHeader.html
Properties File
TableHeader.xml
GEN:FieldLabel
z Page 541
Generated Page
z Page 542
Procedure
Step 1: Set the Display Style property to Hyperlink for each of the GEN:FieldLabel code generation tags.
Tag Property
Setting
Display Style
Hyperlink
Step 2: The GEN:FieldLabels must not be in GEN:HeaderTemplate. This is because the template tags are not
expanded until run time, and event binding can only happen between controls that exist at compile time.
Step 3: If Hyperlink is selected for any of the GEN:FieldLabel tags, then the tag must be hooked up to the table in
order for sorting to be functional. Go to the Events tab in the Properties dialog for the Products code generation tag
and specify the event producers and consumers for the FieldLabel tag and the Products tag. Generally, the
controls should be set to both produce and consume the events. These bindings should be set for each FieldLabel
tag that is specified as a Hyperlink.
Producer
Consumer
Products
SortByName
Products
SortByPrice
SortByName
Products
z Page 543
Producer
Consumer
SortByPrice
Products
Description
SubTotalsOnTable.html
Properties File
SubTotalsOnTable.xml
Generated Page
z Page 544
Procedure
Step 1: Set the Default Page Size property to 5 for the Products tag. This will display only 5 records on a page. The
Default Page Size is initially set to 20 to get 20 records per page. To get an unlimited number of records to be
displayed on the page, set the default page size to -1.
Tag Property
Setting
Products
z Page 545
Tag Property
Setting
z Page 546
ADVANCED TABLES
This section contains these examples:
Description
TableAlternatingRows.html
Properties File
TableAlternatingRows.xml
GEN:AlternatingItemTemplate
z Page 547
Generated Page
z Page 548
Procedure
Step 1: Create the layout page file as shown above containing both ItemTemplate and AlternatingItemTemplate
code generation tags. Note that the names of the FieldValue tags are the same within the surrounding
GEN:ItemTemplate and GEN:AlternatingItemTemplate tags.
You can also create a different alternating layout as well.
Step 2: Set the data binding properties for the FieldValue tags.
Step 3: Build and run the application.
z Page 549
Description
Attribute
Description
TableAlternatingDifferentRows.html
Properties File
TableAlternatingDifferentRows.xml
GEN:AlternatingItemTemplate
Generated Page
z Page 550
Procedure
Step 1: Create the layout page file as shown above containing both ItemTemplate and AlternatingItemTemplate
code generation tags. Note that the names of the FieldValue tags are the same within the surrounding
GEN:ItemTemplate and GEN:AlternatingItemTemplate tags.
You can also create a different alternating layout as well.
Step 2: Set the data binding properties for the FieldValue tags.
Step 3: Build and run the application.
z Page 551
Description
TableCustomLayout.html
Properties File
TableCustomLayout.xml
GEN:ItemTemplate
Generated Page
z Page 552
Procedure
Step 1: Create the layout page file as shown above containing the ItemTemplate code generation tag with the
desired layout. The contents can be displayed in a tabular format as shown in previous examples or can be shown
with any custom layout you specify.
You can also create a different alternating layout as well.
Step 2: Set the data binding properties for the FieldValue tags.
Step 3: Build and run the application.
Description
TableCustomLayoutWithSort.html
Properties File
TableCustomLayoutWithSort.xml
GEN:ItemTemplate
z Page 553
Generated Page
z Page 554
</div>
Procedure
Step 1: Create the layout page file as shown above containing the ItemTemplate code generation tag with the
desired layout. The contents can be displayed in a tabular format as shown in previous examples or can be shown
with any custom layout you specify.
You can also create a different alternating layout as well.
Step 2: Set the data binding properties for the FieldValue tags.
Step 3: Build and run the application.
z Page 555
Generated Page
z Page 556
<td class="header_cell">
<GEN:FIELDLABEL NAME="RequiredDateFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="ShippedDateFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="ShipViaFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="FreightFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="ShipNameFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="ShipAddressFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="ShipCityFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="ShipRegionFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="ShipPostalCodeFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="ShipCountryFieldLabel"></GEN:FIELDLABEL>
</td>
</tr>
<GEN:ITEMTEMPLATE NAME="RecordRow">
<tr>
<td class="icon_cell" width="1">
<GEN:IMAGEBUTTON NAME="RecordRowEditButton"></GEN:IMAGEBUTTON>
</td>
<td class="icon_cell" width="1">
<GEN:IMAGEBUTTON FILE="../OtherComponents/Button-Everest.html"
NAME="RecordRowViewButton"></GEN:IMAGEBUTTON>
</td>
<td class="icon_cell" width="1">
<GEN:SELECTION TYPE="Single" NAME="RecordRowSelection"></GEN:SELECTION>
</td>
<td class="table_cell" Style = "Text-Align:Right">
<GEN:FIELDVALUE NAME="OrderIDTableFieldValue"></GEN:FIELDVALUE>
z Page 557
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="CustomerID1TableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" Style = "Text-Align:Right">
<GEN:FIELDVALUE NAME="EmployeeIDTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="OrderDateTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="RequiredDateTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="ShippedDateTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" Style = "Text-Align:Right">
<GEN:FIELDVALUE NAME="ShipViaTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" Style = "Text-Align:Right">
<GEN:FIELDVALUE NAME="FreightTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="ShipNameTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="ShipAddressTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="ShipCityTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="ShipRegionTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="ShipPostalCodeTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" >
<GEN:FIELDVALUE NAME="ShipCountryTableFieldValue"></GEN:FIELDVALUE>
</td>
</tr>
<!start -->
<tr>
<td colspan="17" align="center">
z Page 558
<GEN:TABLE NAME="Order_DetailsTable">
<table cellpadding=0 cellspacing=0 border=0>
<tr class="column_header">
<td class="header_cell" colspan="3"><img src="../Images/Everest/space.gif" height="1" width="1" alt=""></td>
<td class="header_cell"><GEN:FIELDLABEL NAME="OrderID1FieldLabel"></GEN:FIELDLABEL></td>
<td class="header_cell"><GEN:FIELDLABEL NAME="ProductIDFieldLabel"></GEN:FIELDLABEL></td>
<td class="header_cell"><GEN:FIELDLABEL NAME="UnitPriceFieldLabel"></GEN:FIELDLABEL></td>
<td class="header_cell"><GEN:FIELDLABEL NAME="QuantityFieldLabel"></GEN:FIELDLABEL></td>
<td class="header_cell"><GEN:FIELDLABEL NAME="DiscountFieldLabel"></GEN:FIELDLABEL></td>
</tr>
<GEN:ITEMTEMPLATE NAME="RecordRow2">
<tr>
<td class="icon_cell" width="1">
<GEN:IMAGEBUTTON NAME="RecordRowEditButton2"></GEN:IMAGEBUTTON>
</td>
<td class="icon_cell" width="1">
<GEN:IMAGEBUTTON FILE="../OtherComponents/Button-Everest.html"
NAME="RecordRowViewButton2"></GEN:IMAGEBUTTON>
</td>
<td class="icon_cell" width="1">
<GEN:SELECTION TYPE="Single" NAME="RecordRowSelection2"></GEN:SELECTION>
</td>
<td class="table_cell" Style = "Text-Align:Right">
<GEN:FIELDVALUE NAME="OrderID1TableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" Style = "Text-Align:Right">
<GEN:FIELDVALUE NAME="ProductIDTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" Style = "Text-Align:Right">
<GEN:FIELDVALUE NAME="UnitPriceTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" Style = "Text-Align:Right">
<GEN:FIELDVALUE NAME="QuantityTableFieldValue"></GEN:FIELDVALUE>
</td>
<td class="table_cell" Style = "Text-Align:Right">
<GEN:FIELDVALUE NAME="DiscountTableFieldValue"></GEN:FIELDVALUE>
</td>
</tr>
</GEN:ITEMTEMPLATE>
</table>
</GEN:TABLE>
<td>
</tr>
<!end -->
z Page 559
</GEN:ITEMTEMPLATE>
</GEN:TABLE>
Procedure
Step 1: Using Iron Speed Designer's Application Builder, create a Show Record Page for the Customers table.
Make sure to add a master-detail table for the Orders table. This example uses the Northwind database's
Customers, Orders and Order Details tables.
Step 2: Locate the resulting layout page file, e.g.:
\<Application Folder>\Source\CustomersOTM\ShowCustomersOTMRecord.html
Step 3: Edit ShowCustomersOTMRecord.html and add <GEN:Table> .... </GEN:Table> to the master-detail Orders
table's <GEN:ItemTemplate>. The layout page file above shows this additional HTML starting at <!-- start --> and
ending at <!-- end -->.
Step 4: Set the data binding properties for the OrderDetails tag in ShowCustomersOTMRecord.html.
Tag Property
Setting
OrderDetails
OrderDetails
FK_Order_Details_Orders
This specifies the foreign key relationship from the Order Details table to
the Order table.
Step 5: Set the properties for each column heading code generation tag in the Order Details table.
Tag Property
Setting
Order_Details
Order_Details
Field
OrderID
Label Text
Order ID
Display Style
Label
Step 6: Set the properties for the Edit and Show icons.
z Page 560
Tag Property
Setting
RecordRowEditButton2
RecordRowViewButton2
../Images/Everest/icon_edit.gif
Redirect
Parent Record
Redirect URL
../OrderDetails/EditOrder_DetailsRecord.aspx?OrderID={0}
Redirect Parameters
ID
Setting
Order_Details
Order_Details
Display Field
OrderID
z Page 561
Description
MasterDetailPage.html
Properties File
MasterDetailPage.xml
Generated Page
z Page 562
<GEN:Record Name="Order">
<table cellpadding="5" style="border-collapse: collapse" border="1"
bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Order Id:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="OrderId" />
</td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Order Date:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="OrderDate" />
</td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Freight:</td>
<td>
<GEN:FieldValue Name="Freight" />
</td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Shipping Address:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="ShipName" /><br />
<GEN:FieldValue Name="ShipAddress" /><br />
<GEN:FieldValue Name="ShipCity" />,
<GEN:FieldValue Name="ShipRegion" />
<GEN:FieldValue Name="ShipPostalCode" /><br />
<GEN:FieldValue Name="ShipCountry" /></td>
</tr>
</table> 
<GEN:Table Name="OrderDetails">
<table cellpadding="5" style="border-collapse: collapse" border="1"
bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">
<GEN:HeaderTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td align="center">Product Id</td>
<td align="center">Unit Price</td>
<td align="center">Quantity</td>
<td align="center">Discount</td>
</tr>
</GEN:HeaderTemplate>
<GEN:ItemTemplate>
<tr style="font-family:Verdana; font-size:10px">
z Page 563
<td>
<GEN:FieldValue Name="ProductId" />
</td>
<td align="right">
<GEN:FieldValue Name="UnitPrice" />
</td>
<td align="right">
<GEN:FieldValue Name="Quantity" />
</td>
<td align="right">
<GEN:FieldValue Name="Discount" />
</td>
</tr>
</GEN:ItemTemplate>
</table>
</GEN:Table>
</GEN:Record>
</div>
Procedure
The GEN:Table tag is used within the GEN:Record tag.
Step 1: Set the data binding properties for the OrderDetails tag.
Tag Property
Setting
OrderDetails
OrderDetails
FK_Order_Details_Order
This specifies the foreign key relationship from the Order Details table to the
Order table.
z Page 564
ADVANCED PAGES
This section contains these examples:
Description
SearchProduct.html
Properties File
SearchProduct.xml
Generated Page
z Page 565
Procedure
This example uses a GEN:Table tag and displays the first record that matches the search criteria. A later example will
show how to add Next and Previous buttons to page through multiple records.
Step 1: Set the Default Page Size property for the Products table to display only one record instead of the default
size of 20.
Tag Property
Setting
Product
z Page 566
Tag Property
Setting
Step 2: Hook up the search button to inform the search text control when the button is clicked. Go to the Event
tab in the Properties dialog and select the Event Producer as Search and the Event Consumer control as
SearchTextBox.
Step 3: Hook up the search text box to inform the table to update itself based on the search criteria. Go to the Event
tab in the Properties dialog and select the Event Producer as SearchTextBox and the Event Consumer control as
Products.
Step 4: (Optional). If you intend to programmatically change the search control when the table is updated, then the
products table must also be hooked up to the search text box. Go to the Event tab in the Properties dialog and select
the Event Producer as Products and the Event Consumer control SearchTextBox.
Step 5: Build and run the application.
Description
SearchAndPagination.html
Properties File
SearchAndPagination.xml
GEN:SearchFilter
GEN:PagingControl
GEN:PushButton with GEN:Table
z Page 567
Generated Page
z Page 568
</GEN:Table>
</div>
Procedure
This example is similar to the earlier example with just the search control, so see earlier procedure. Just like there is a
search text box and a separate button to begin the search, there is a paging control and a separate button to begin the
process of paging. The paging control does not have a layout and is not displayed to the user, but receives the events
generated from the button.
Step 1: Set the properties for each of the paging controls. Select the Pagination Type and the corresponding
Pagination Button. For example, for the Previous paging control code generation tag, select the Pagination Type as
Previous Page and the Pagination Button as the PreviousButton.
Tag Property
Setting
PreviousPage
NextPage
Pagination type
Previous Page
Pagination button
Previous Button
Step 2: Each of the paging controls must have a corresponding button. The button can be a GEN:LinkButton,
GEN:ImageButton, GEN:PushButton or have a composite layout using GEN:Button.
Tag Property
Setting
PreviousButton
NextButton
Action
Activate
Step 3: Hook up the search button to inform the search text control when the button is clicked. Go to the Event
tab in the Properties dialog and select the Event Producer as Search and the Event Consumer control as
SearchTextBox.
Step 4: Hook up the search text box to inform the table to update itself based on the search criteria. Go to the Event
tab in the Properties dialog and select the Event Producer as SearchTextBox and the Event Consumer control as
Products.
z Page 569
Step 5: (Optional). If you intend to programmatically change the search control when the table is updated, then the
products table must also be hooked up to the search text box. Go to the Event tab in the Properties dialog and select
the Event Producer as Products and the Event Consumer control SearchTextBox.
Step 6: Build and run the application.
z Page 570
DASHBOARD PAGES
This section contains these examples:
Dashboard Page
Dashboard Page
This example shows how to create a dashboard page that displays a count of records and totals based on selected
fields.
Description
Attribute
Description
Dashboard.html
Properties File
Dashboard.xml
GEN:TableStatistic
Generated Page
z Page 571
<p align="center">Dashboard</td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td>Total Products</td>
<td colspan="2"><GEN:TableStatistic Name="TotalProducts"/></td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td>Available Products</td>
<td colspan="2"><GEN:TableStatistic Name="CurrentProducts"/></td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td>Discountinued Products</td>
<td colspan="2"><GEN:TableStatistic Name="DiscountinuedProducts"/></td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td>Total Orders</td>
<td><GEN:TableStatistic Name="TotalOrders"/></td>
<td align="right"><GEN:TableStatistic Name="TotalOrdersAmt"/></td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td>Total Orders 1996</td>
<td><GEN:TableStatistic Name="TotalOrders1996"/></td>
<td align="right"><GEN:TableStatistic Name="TotalOrders1996Amt"/></td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td>Total Orders 1997</td>
<td><GEN:TableStatistic Name="TotalOrders1997"/></td>
<td align="right"><GEN:TableStatistic Name="TotalOrders1997Amt"/></td>
</tr>
</table>
</div>
Procedure
This procedure shows how to create a simple dashboard by using existing database tables and views.
Step 1: Set the properties for the TotalProducts code generation tag.
Tag Property
Setting
TotalProducts
z Page 572
Tag Property
Setting
Products
To display the total number of products, we simply have to count the total
number of records in the database.
Display Field
Select any field. The Field is not relevant when counting the number of records.
Statistic Type
Count
Note: Microsoft SQL Server does not allow counting of ID fields. Iron Speed Designer automatically selects a non-ID
field for counting the number of records.
Step 2: Set the data binding properties for the CurrentProducts code generation tag. The additional Where clause
limits the count to products that have not been discontinued.
Tag Property
Setting
CurrentProducts
Products
Products.Discontinued = False
Display Field
ProductName
Statistic Type
Count
Step 3: Repeat the process for the DiscontinuedProducts tag. This time specify an additional Where clause with the
Products Discontinued field as True.
Tag Property
Setting
DiscontinuedProducts
Products
Products.Discontinued = True
Display Field
ProductName
Statistic Type
Count
z Page 573
Step 4: Set the data binding properties for the TotalOrders code generation tag.
Tag Property
Setting
TotalOrders
Orders
Statistic Type
Count
Step 5: Set the data binding properties for the TotalOrdersAmt code generation tag.
Tag Property
Setting
TotalOrdersAmt
Order Subtotals
Order Subtotals is a database view that contains a join between Orders and
Order Details. This view contains the Order ID and a sub-total amount for all
the items in an order.
Display Field
Subtotal
Statistic Type
Sum
This selection will display a number that is the sum of all Subtotal fields in the
database table or view.
Step 6: Build and run the application and view the page.
To display the number of orders in 1996 and 1997 and the dollar amount of those orders, we will create two queries
that will join the Orders table with the Order Subtotals database view and further restrict the records in the query based
on a date rage of the year.
Step 7: Create a query by going to the Databases folder and pressing the Query tab. Name the query Orders 96.
Select the Orders and Order Subtotals view. Select the four fields.
z Page 574
Description
Attribute
Description
Dashboard.html
Properties File
Dashboard.xml
GEN:TableStatistic
Other
Queries
Generated Page
z Page 575
Procedure
This procedure shows how to use queries to create more complex dashboard elements. We will create two queries by
joining the Orders table and the Order Subtotals view. We will then limit each of the queries to return totals for orders
placed in 1996 and 1997.
Note: The Order Subtotals view does not contain an Order Date field. In order to get the total for a specific date range,
we must join the two tables together and further select the records based on order date.
Step 1: In the Application Explorer tab, select Project, New Query to create a query. Provide a name to the query
such as Orders 1996.
Tag
Property
Setting
Query name
Orders 1996
Step 2: You can now limit the columns from the two tables to the specific columns needed by us to make this query
more efficient. This ensures that the data transferred between the database and the application is kept to a minimum.
From the Orders table, select the OrderID and OrderDate fields. From the Order Subtotals table, select the OrderID
and Subtotal fields.
Tag Property
Setting
Query name
Orders 1996
z Page 576
Tag Property
Setting
Order Subtotals
Orders
Fields
Orders.OrderID
Orders.OrderDate
Order Subtotals.OrderID
Order Subtotals.Subtotal
Step 3: Join the Orders table with the Order Subtotals view by specifying selection criteria where
Orders.OrderID is equal to Order Subtotals.OrderID
The selection criterion joins the two tables and creates a virtual table in the database with columns from the two tables.
Step 4: Add additional selection criteria to limit the joined virtual table by orders whose order date is in 1996. The first
criteria will ensure that the order date is on or after Jan 1, 1996. The second selection criterion specifies the order
date is before Jan 1, 1997.
Tag Property
Setting
Query name
Orders 1996
Order Subtotals
Orders
z Page 577
Tag Property
Setting
Fields
Orders.OrderID
Orders.OrderDate
Order Subtotals.OrderID
Order Subtotals.Subtotal
Selection criteria
Step 5: Repeat this process by creating a new query called Orders 1997 by joining the same two tables, and adding
selection criteria to limit the orders to be within 1997.
Tag Property
Setting
Query name
Orders 1997
Order Subtotals
Orders
Fields
Orders.OrderID
Orders.OrderDate
Order Subtotals.OrderID
Order Subtotals.Subtotal
Selection criteria
Step 6: Set the properties for the TotalOrders1996 code generation tag.
z Page 578
Tag Property
Setting
TotalOrders1996
Orders 1996
Display Field
Order Subtotals.OrderID
Statistic Type
Count
Step 7: Set the properties for the TotalOrders1996Amt code generation tag.
Tag Property
Setting
TotalOrders1996Amt
Orders 1996
Display Field
Order Subtotals.Subtotal
Statistic Type
Sum
This shows the total amount of orders placed during 1996.
Step 8: Repeat the same process for the other two code generation tags.
Step 9: Build and run the application to view the page.
z Page 579
HTML layout page files. Constructing more sophisticated pages using code generation tags in layout pages.
Properties files. Directing the application generation process by modifying various component properties.
Table binding files. Directing the application generation process by modifying the table binding file.
Some of the examples here refer to the Tutorials section that provides detailed examples.
This section contains examples for:
z Page 580
Procedure
Step 1: Locate the page on the Application Files tree in the Application Explorer tab.
Step 2: Open the pages Properties dialog and locate the DialogTitle code generation tag. Change the HTML text.
Tag Property
Setting
DialogTitle
HTML
Add Customers
Add any text you wish.
z Page 581
Procedure
Step 1: Locate the page on the Application Files tree in the Application Explorer tab.
Step 2: Open the pages Properties dialog and select the root node in the left hand tree corresponding to the page.
Change the title and save the settings.
Tag Property
Setting
AddCustomers.html
This is the root node of the Properties dialog tree.
Page title
Add Customers
This can be any text you wish.
Setting
Save
Button Text
Save
z Page 582
Tag Property
Setting
True
Action
Update Data
This indicates to the application that data must be added or updated in the
database. Do not change the command name from Update Data,
otherwise the updated data will not be saved in the database.
Parent Record
Redirect URL
Back
Optionally, you can specify the URL of the current page to refresh the
browser with the same page.
Step 2: Insert a <GEN:Use Type=Menu /> code generation tag into each of your layout pages where you would
like the menus placed.
z Page 583
Specify the layout page file to point to the newly created menu.
For both MenuItem2 and MenuItem2Hilited, set the Button Text and Redirect URL properties to the same
values.
Tag Property
Setting
MenuItem2
Button Text
Save
True
Action
Update Data
This indicates to the application that data must be added or updated in the
database. Do not change the command name from Update Data,
otherwise the updated data will not be saved in the database.
Parent Record
Redirect URL
Back
Optionally, you can specify the URL of the current page to refresh the
browser with the same page.
Tag Property
Setting
MenuItem2Hilited
Button Text
Save
True
Action
Update Data
This indicates to the application that data must be added or updated in the
database. Do not change the command name from Update Data,
otherwise the updated data will not be saved in the database.
z Page 584
Tag Property
Setting
Parent Record
Redirect URL
Back
Optionally, you can specify the URL of the current page to refresh the
browser with the same page.
Step 4: Additionally, you must set a pass-through attribute for MenuItem2Hilited in the Properties tab in the
Properties dialog. Set the Visible attribute to False. Otherwise, both the MenuItem2 and MenuItem2Hilited tabs
will be visible when you run the application.
Attribute
Value
MenuItem2Hilited
Visible
False
Step 5: Specify the HighlightSettings attribute on each of the layout pages to designate the current menu item.
Step 6: Build and run the application.
z Page 585
Procedure
Step 1: Locate and open the layout page file of the page you wish to modify, e.g.:
\Apps\Tutorial\Source\Tutorial Pages\ProductSelector.html
Step 2: Add the following client script code inside the pages layout:
<script language=javascript>
<!-function updateTarget(selectedValue)
{
var target = window.opener.document.all('<%# Request.Params("target") %>');
target.value = selectedValue;
window.close();
}
//-->
</script>
z Page 586
Tag Property
Setting
ProductId
Display style
Literal
Step 5: Build and run the application. The Product Selector page is now ready to use.
Note that the single value data binding expression references the GEN:FieldValue tags run-time server control.
Step 3 (alternate method): Add the following HTML/DHTML inside the pages layout:
<GEN:FieldValue Name="ProductId" />
z Page 587
<a
href="javascript:"
onclick="openProductSelector('<%# Container.FindControl("V_ProductId").ClientId %>'); return false;"
>Find Product</a>
Note that the single value data binding expression references the GEN:FieldValue tags run time server control.
Unlike the previous step 3 code, this version is suitable for use inside of a GEN:ItemTemplate tag.
Step 4: Set the display style property to Literal.
Tag Property
Setting
ProductId
Display style
Text Box
z Page 588
z Page 589
z Page 590
<Description>(Description)</Description>
</Self>
</ComponentDefinition>
z Page 591
z Page 592
Procedure
Step 1: In the AddRecordValMsg pages Properties dialog, select the ProductName FieldValue tag.
Step 2: From the Properties tab, add or modify the properties that begin with
V_ProductNameRequiredFieldValidator: to specify the properties of the tags RequiredFieldValidator. For a more
generic example:
Attribute
Value
V_<YourFieldName>RequiredFieldValidator:Enabled
True
V_<YourFieldName>RequiredFieldValidator:ErrorMessage
V_<YourFieldName>RequiredFieldValidator:Text
* + <YourFieldName>
<YourFieldName> is the name of the field.
z Page 593
value is numeric and greater than zero. If the quantity value is valid, the function returns True. If the value is not valid,
it sets an error message and returns False, indicating that the record should not be updated, but instead an error
indicator should be returned to the user. Validation of data for fields other than the quantity field is handed off to the
default validateData() function.
Generated Page
The resulting screen looks like this when an invalid Product Name is entered. Note the red error indicator next to the
invalid field:
A modified AddRecord Page with an Invalid
ProductName.
Procedure
Step 1: Locate and open the safe class of the page containing the control you wish to modify, e.g.:
\Apps\Tutorial\ Tutorial Pages\ AddRecord.safe.aspx.vb
Step 2: Add the following code inside the pages safe class:
'This Handler sets the V_ProductNameCustomValidator control's Visible and Enabled Properties to True
'This Handler could be replaced with Passthrough attributes during Designer Binding
Private Sub AddRecord_Init(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles MyBase.Init
If (Not Me.IsPostBack) Then
Me.V_ProductNameCustomValidator.Visible = True
Me.V_ProductNameCustomValidator.Enabled = True
End If
End Sub
'This Handler implements server side validation logic for the V_ProductNameCustomValidator control
Private Sub V_ProductNameCustomValidator_ServerValidate(ByVal source As Object, ByVal args As _
System.Web.UI.WebControls.ServerValidateEventArgs) _
Handles V_ProductNameCustomValidator.ServerValidate
Select Case (args.Value)
Case "wrong", "incorrect"
args.IsValid = False 'The specific values "wrong" and "incorrect" are invalid
End Select
z Page 594
End Sub
Step 2 (alternate method): Add the following code inside the pages safe CustomRecordControl class, located in the
same file as the pages safe class:
'This Handler sets the V_ProductNameRecordControlCustomValidator control's Visible and Enabled Properties to True
'This Handler could be replaced with Passthrough attributes during Designer Binding
Private Sub CustomRecordControl_Init(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles MyBase.Init
If (Not Me.Page.IsPostBack) Then
Dim v As WebControl = CType(Me.FindControl("V_ProductNameRecordControlCustomValidator"), WebControl)
v.Visible = True
v.Enabled = True
End If
End Sub
Protected Overrides Function ValidateData(ByVal v As _
IronSpeed.Base.Web.UI.WebControls.RecordControlCustomValidator) As Boolean
If (v.ID = "V_ProductNameRecordControlCustomValidator") Then
'if the specified validator is the one for the ProductName control, perform extra validation
Select Case (v.GetValueToValidate())
Case "wrong", "incorrect"
Return False 'The specific values "wrong" and "incorrect" are invalid
End Select
End If
Return MyBase.ValidateData(v)
End Function
Step 2 (alternate method): Add the following code inside the pages safe CustomRecordControl class, located in the
same file as the pages safe class:
'This method override sets the V_ProductNameRecordControlCustomValidator
control's Visible and Enabled Properties to True
'This method override could be replaced with Passthrough attributes during Designer Binding
Protected Overrides Sub ValidatorInitialized(ByVal v As IronSpeed.Base.IValidatorComponent)
MyBase.ValidatorInitialized(v)
If (CType(v, Control).ID = "V_ProductNameRecordControlCustomValidator") Then
CType(v, Control).Visible = True
CType(v, WebControl).Enabled = True
End If
End Sub
Protected Overrides Function ValidateData(ByVal v As _
IronSpeed.Base.Web.UI.WebControls.RecordControlCustomValidator) As Boolean
If (v.ID = "V_ProductNameRecordControlCustomValidator") Then
'if the specified validator is the one for the ProductName control, perform extra validation
Select Case (v.GetValueToValidate())
z Page 595
Step 3: Build and run the application. The page will now prevent records from being added with the Product Name
wrong or incorrect.
Step 3: Build and run the application. The page will now validate automatically when the Product Name is changed.
z Page 596
Procedure
Step 1: Locate and open the safe class of the page containing the control you wish to modify, e.g.:
\Apps\Tutorial\Tutorial Pages\EditRecord.safe.aspx.vb
Step 2: Add the following code inside the pages safe CustomRecordControl class, located in the same file as the
pages safe class:
Protected Overrides Function ValidateCheckSum() As Boolean
'(re)set the current control's record's CheckSum to Nothing
Dim r As IronSpeed.Base.IRecord = MyBase.GetRecord(True)
If (Not IsNothing(r)) Then
If (TypeOf (r) Is IronSpeed.Base.IRecordWithCheckSum) Then
CType(r, IronSpeed.Base.IRecordWithCheckSum).SetCheckSumValue(Nothing)
End If
End If
Return MyBase.ValidateCheckSum()
End Function
z Page 597
Step 2: Add the following code inside the pages safe class:
'This Handler sets the V_ProductName TextBox's AutoPostBack Property to True
'This Handler could be replaced with a Passthrough attribute during Designer Binding
Private Sub AddRecord_Init(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles MyBase.Init
If (Not Me.IsPostBack) Then
Me.V_ProductName.AutoPostBack = True
End If
End Sub
'This Handler updates the V_UnitPrice control whenever the V_ProductName TextBox's Text changes
Private Sub V_ProductName_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles V_ProductName.TextChanged
Me.V_UnitPrice.SetValue(CStr(Me.V_ProductName.Text.Length))
End Sub
Step 2 (alternate method): Add the following code inside the pages safe class:
'This Handler sets the V_ProductName TextBox's AutoPostBack Property to True
'This Handler could be replaced with a Passthrough attribute during Designer Binding
Private Sub AddRecord_Init(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles MyBase.Init
If (Not Me.IsPostBack) Then
Me.V_ProductName.AutoPostBack = True
End If
End Sub
'This Handler updates the V_UnitPrice control whenever the V_ProductName TextBox's Text changes
Private Sub V_ProductName_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles V_ProductName.TextChanged
Try
Dim c As IronSpeed.Base.Data.BaseColumn = Me.V_UnitPrice.GetField()
Dim cv As IronSpeed.Base.Data.ColumnValue = c.ParseValue(CStr(Me.V_ProductName.Text.Length))
Dim newValue As String = c.FormatValue(cv)
Me.V_UnitPrice.SetValue(newValue)
Catch exc As System.Exception
Me.V_UnitPrice.Text = exc.ToString()
End Try
End Sub
Step 3: Build and run the application. The page will now automatically set the Unit Price field whenever the Product
Name field is changed.
z Page 598
Step 2 (alternate method): Add the following code inside the pages safe CustomRecordControl class located in the
same file as the pages safe class:
Protected Overrides Sub InitializeFieldControl(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
MyBase.InitializeFieldControl(fvc)
If (CType(fvc, Control).ID = "V_ProductName") Then
'if the specified control is V_ProductName, perform extra (re)initialization
Dim p As IronSpeed.Base.Web.UI.BasePage = CType(Me.Page, IronSpeed.Base.Web.UI.BasePage)
If (p.SystemUtils.IsLoggedIn()) Then
fvc.SetValue("Signed In User: " & p.SystemUtils.GetLoginId())
Else
fvc.SetValue("Not Signed In")
End If
End If
End Sub
z Page 599
z Page 600
Step 2 (alternate method): Add the following code inside the pages safe class:
'This Handler updates the V_UnitPrice control after it has been (re)initialized,
'but only if the control's corresponding Record is editable, new, and is not yet saved to the DB
Private Sub V_UnitPrice_LoadedData(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles V_UnitPrice.LoadedData
Dim fvc As IronSpeed.Base.IFieldValueComponent = Me.V_UnitPrice
If (IsNew(GetRecordObject(fvc))) Then
fvc.SetValue(Me.GetInitialFieldValue()) 'pre-initialize the field control
End If
End Sub
'returns True if the record is new and has not yet been saved to the DB
Private Shared Function IsNew(ByVal r As IronSpeed.Base.IRecord) As Boolean
'if the record is editable and the record's table has a primary key
If ((Not IsNothing(r)) AndAlso (not r.IsReadOnly())) AndAlso _
(TypeOf (r) Is IronSpeed.Base.IRecordWithPrimaryKey)) Then
'get the record's ID
Dim recordId As IronSpeed.Base.Data.KeyValue = _
CType(r, IronSpeed.Base.IRecordWithPrimaryKey).GetID()
'if the record's ID is Nothing, then the record is new and has not yet been saved to the DB
If (IsNothing(recordId)) Then
Return True
End If
End If
Return False
End Function
'gets the record associated with a field control
Private Shared Function GetRecordObject(ByVal fvc As IronSpeed.Base.IFieldValueComponent) As _
IronSpeed.Base.IRecord
'get the field control's container
Dim fieldControlContainer As IronSpeed.Base.IFieldValueComponentContainer = fvc.GetContainer()
'if the field control's container is a record control
z Page 601
Step 2 (alternate method): Add the following code inside the pages safe CustomRecordControl class, located in the
same file as the pages safe class:
'This method updates the V_UnitPrice control after it has been (re)initialized,
'but only if the control's corresponding Record is editable, new, and is not yet saved to the DB
Protected Overrides Sub InitializeFieldControl(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
MyBase.InitializeFieldControl(fvc)
If (CType(fvc, Control).ID = "V_UnitPrice") Then
'if the specified control is V_UnitPrice, perform extra (re)initialization
If (IsNew(GetRecordObject(fvc))) Then
fvc.SetValue(Me.GetInitialFieldValue()) 'pre-initialize the field control
End If
End If
End Sub
'returns True if the record is new and has not yet been saved to the DB
Private Shared Function IsNew(ByVal r As IronSpeed.Base.IRecord) As Boolean
'if the record is editable and the record's table has a primary key
If ((Not IsNothing(r)) AndAlso (not r.IsReadOnly())) AndAlso _
(TypeOf (r) Is IronSpeed.Base.IRecordWithPrimaryKey)) Then
'get the record's ID
Dim recordId As IronSpeed.Base.Data.KeyValue = CType(r, IronSpeed.Base.IRecordWithPrimaryKey).GetID()
'if the record's ID is Nothing, then the record is new and has not yet been saved to the DB
If (IsNothing(recordId)) Then
z Page 602
Return True
End If
End If
Return False
End Function
'gets the record associated with a field control
Private Shared Function GetRecordObject(ByVal fvc As IronSpeed.Base.IFieldValueComponent) As _
IronSpeed.Base.IRecord
'get the field control's container
Dim fieldControlContainer As IronSpeed.Base.IFieldValueComponentContainer = fvc.GetContainer()
'if the field control's container is a record control
If ((Not IsNothing(fieldControlContainer)) AndAlso _
(TypeOf (fieldControlContainer) Is IronSpeed.Base.IRecordComponent)) Then
'get the record as writable
Dim recordControl As IronSpeed.Base.IRecordComponent = _
CType(fieldControlContainer, IronSpeed.Base.IRecordComponent)
Dim record As IronSpeed.Base.IRecord = recordControl.GetRecord(True)
Return record
End If
Return Nothing
End Function
'calculates or gets an initial value for a field
Private Function GetInitialFieldValue() As String
Dim s As String
's = 1.23
's = Math.Round(Math.PI, 2).ToString()
's = Math.Round((10.0 * New System.Random().NextDouble()), 2).ToString()
s = CStr(DateTime.Now().Minute + (0.01 * DateTime.Now().Second))
Return s
End Function
z Page 603
Procedure
Step 1: Locate and open the safe class of the page containing the control you wish to modify, e.g.:
\Apps\Tutorial\Tutorial Pages\DisplayDropDown.safe.aspx.vb
Step 2: Add the following code inside the pages safe class:
'This Handler updates the V_Discontinued control after it has been (re)initialized
Private Sub V_Discontinued_LoadedData(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles V_Discontinued.LoadedData
Me.V_Discontinued.SortItems(True, True)
Dim li As ListItem = Me.V_Discontinued.Items(0)
Me.V_Discontinued.Items.RemoveAt(0)
Me.V_Discontinued.Items.Add(li)
'IronSpeed.Base.Web.UI.WebControls.DropDownList.SortItems( _
' CType(Me.V_Discontinued, System.Web.UI.WebControls.DropDownList), _
' New IronSpeed.Base.Web.UI.WebControls.DropDownList.ListItemTextComparer(True))
End Sub
Removing ** Please Select ** from Radio Button List (or Dropdown List)
z Page 604
This example shows how to make the Reports To button on the EmployeeFKLink page of the Tutorial application
invisible for Employees that do not report to anyone.
Procedure
Step 1: Locate and open the safe class of the page containing the control you wish to modify, e.g.:
\Apps\Tutorial\Tutorial Pages\EmployeeFKLink.safe.aspx.vb
Step 2: Add the following code inside the pages safe class:
'This Handler updates the V_ReportsTo control's Visible property after its data has been (re)loaded
Private Sub V_ReportsTo_LoadedData(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles V_ReportsTo.LoadedData
Me.V_ReportsTo.Visible = (Me.V_ReportsTo.GetValue() <> "0")
End Sub
Step 2 (alternate method): Add the following code inside the pages safe class:
'This Handler updates the sender's Visible property after the V_ReportsTo control's data has been (re)loaded
'It assumes sender inherits from Control and implements IronSpeed.Base.IFieldValueComponent.
Private Sub V_ReportsTo_LoadedData(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles V_ReportsTo.LoadedData
Dim fvc As IronSpeed.Base.IFieldValueComponent = CType(sender, IronSpeed.Base.IFieldValueComponent)
CType(fvc, Control).Visible = (fvc.GetValue() <> "0")
End Sub
Step 2 (alternate method): Add the following code inside the pages safe class:
'This Handler manually attaches a Sub as an event handler for the V_ReportsTo control's LoadedData event
Private Sub EmployeeFKLink_Init(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles MyBase.Init
AddHandler Me.V_ReportsTo.LoadedData, AddressOf Me.V_ReportsTo_LoadedData
End Sub
'This Sub updates the sender's Visible property.
'It assumes sender inherits from Control and implements IronSpeed.Base.IFieldValueComponent.
Private Sub V_ReportsTo_LoadedData(ByVal sender As Object, ByVal e As System.EventArgs)
Dim fvc As IronSpeed.Base.IFieldValueComponent = CType(sender, IronSpeed.Base.IFieldValueComponent)
CType(fvc, Control).Visible = (fvc.GetValue() <> "0")
End Sub
Step 2 (alternate method): Add the following code inside the pages safe CustomRecordControl class, located in the
same file as the pages safe class:
'Overridden to perform additional initialization for the V_ReportsTo control
Protected Overrides Sub InitializeFieldControl(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
MyBase.InitializeFieldControl(fvc)
If (CType(fvc, Control).ID = "V_ReportsTo") Then
z Page 605
Step 2 (alternate method): Add the following code inside the pages safe CustomRecordControl class, located in the
same file as the pages safe class:
'Overridden to perform additional initialization for the V_ReportsTo control
Protected Overrides Sub InitializeFieldControl(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
MyBase.InitializeFieldControl(fvc)
If (CType(fvc, Control).ID = "V_ReportsTo") Then
'if fvc's ID is V_ReportsTo, then manually attach a Sub as an event handler for the LoadedData event
AddHandler fvc.LoadedData, AddressOf Me.V_ReportsTo_LoadedData
End If
End Sub
'This Sub updates the sender's Visible property.
'It assumes sender inherits from Control and implements IronSpeed.Base.IFieldValueComponent.
Private Sub V_ReportsTo_LoadedData(ByVal sender As Object, ByVal e As System.EventArgs)
Dim fvc As IronSpeed.Base.IFieldValueComponent = CType(sender, IronSpeed.Base.IFieldValueComponent)
CType(fvc, Control).Visible = (fvc.GetValue() <> "0")
End Sub
Step 2 (alternate method): Add the following code inside the pages safe CustomRecordControl class, located in the
same file as the pages safe class:
'This Handler finds the V_ReportsTo control and manually attaches a Sub as an event handler for its LoadedData event
Private Sub CustomRecordControl_Init(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles MyBase.Init
Dim c As Control = Me.FindControl("V_ReportsTo")
If ((Not IsNothing(c)) AndAlso (TypeOf (c) Is IronSpeed.Base.IFieldValueComponent)) Then
Dim fvc As IronSpeed.Base.IFieldValueComponent = CType(c, IronSpeed.Base.IFieldValueComponent)
If (Me Is fvc.GetContainer()) Then
'if this control is the V_ReportsTo control's container, attach the handler
AddHandler fvc.LoadedData, AddressOf Me.V_ReportsTo_LoadedData
End If
End If
End Sub
'This Sub updates the sender's Visible property.
'It assumes sender inherits from Control and implements IronSpeed.Base.IFieldValueComponent.
Private Sub V_ReportsTo_LoadedData(ByVal sender As Object, ByVal e As System.EventArgs)
Dim fvc As IronSpeed.Base.IFieldValueComponent = CType(sender, IronSpeed.Base.IFieldValueComponent)
CType(fvc, Control).Visible = (fvc.GetValue() <> "0")
End Sub
z Page 606
Step 3: Build and run the application. The Reports To button should now be invisible for Employees that do not report
to anyone (e.g. Andrew Fuller/Employee 2).
z Page 607
Procedure
Step 1: Locate and open the safe class of the page containing the control you wish to modify, e.g.:
\Apps\Tutorial\Tutorial Pages\SearchAndPaginationWithNumbers.safe.aspx.vb
Step 2: Add the following code inside the pages safe class:
Private Sub V_Product_RecordDataChanged(ByVal source As Object, ByVal args As System.EventArgs) _
Handles V_Product.RecordDataChanged
Me.V_Product.Visible = (Me.V_Product.TotalRecordCount > 0)
End Sub
Step 2 (alternate method): Add the following code inside the pages safe CustomTableControl class, located in the
same file as the pages safe class:
Private Sub Page_RecordDataChanged(ByVal source As Object, ByVal args As System.EventArgs) _
Handles MyBase.RecordDataChanged
Me.Visible = (Me.TotalRecordCount > 0)
End Sub
Step 3: Build and run the application. The table should now disappear when a search has no matching records.
z Page 608
z Page 609
Here, the FieldSortControl is associated with a LinkButton. The FieldSortControl is really just an invisible entity that
consumes the click of the LinkButton and then generates an event that tells the Table control to sort. In order to hide
the column, you need to hide the LinkButton as shown below.
Procedure
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If (Not Me.IsPostBack) Then
Me.DataBind()
End If
Me.V_CategoryIDFieldLabelButton.Visible = False
End Sub
Note: The "Literal" control style does not support ForeColor and other such properties. For Literal control styles, use
the tags Properties dialog to change the field to a "Label" instead of a "Literal".
Removing ** Please Select ** from Radio Button List (or Dropdown List)
This example shows how to remove the ** Please Select ** selection in a Radio Button List (or Dropdown list). For
purposes of illustration, the ReportsTo Radio Button List field value is the control being modified.
z Page 610
Procedure
Step 1: Locate and open the pages safe class, e.g.:
\MyApp\MyPages\EditMyTableTable.safe.aspx.vb
Step 2: Override the InitializeFieldControl() function in the pages CustomRecordControl class and implement logic to
remove the radio-button or dropdown-list item (subroutine RemovePleaseSelectInReportsTo()).
' This class was generated by Iron Speed Designer.
' This is a "safe" class, meaning that it is generated once
' and never overwritten. Any custom code you add to this class
' will be preserved when you regenerate your application.
' Typical customizations that may be done in this class include
' - adding custom event handlers
' - overriding base class methods
Public Class EditEmployeesTable
Inherits EditEmployeesTableGen
End Class
Namespace PanelControls.EditEmployeesTable
'This control class can be customized to change the behavior of any
'instances instantiated/used by this page/panel.
Public Class CustomTableControl
Inherits IronSpeed.Base.Web.UI.WebControls.TableControl
'Protected Overrides Sub InitializeDataReader(ByVal dr As IronSpeed.Base.Data.DataReader)
'End Sub
'Protected Overrides Sub ModifyRedirectUrl(ByVal args As IronSpeed.Base.IronSpeedEventArgs)
'End Sub
'Private Sub CustomTableControl_DataReaderCreated(ByVal source As Object, ByVal args As System.EventArgs) _
Handles MyBase.DataReaderCreated
'End Sub
'Private Sub CustomTableControl_PageIndexChanging(ByVal sender As Object, ByVal e As _
System.ComponentModel.CancelEventArgs) Handles MyBase.PageIndexChanging
'End Sub
End Class
'This control class can be customized to change the behavior of any
z Page 611
CType(fvc, IronSpeed.Base.Web.UI.WebControls.DropDownList)
'Dim firstListItem As ListItem = dropDownList.Items(0)
'If (firstListItem.Text.IndexOf("** Please Select **") >= 0) Then
' dropDownList.Items.Remove(firstListItem)
'End If
End If
End If
z Page 612
End Sub
End Class
End Namespace
Procedure
Step 1: Create a new application based on the "Northwind" example database that comes with Microsoft SQL Server.
Be sure to select, at a minimum, the Products table, the Orders table, and the Order Details table.
z Page 613
Step 2: Using the Application Builder, create a new "Add Order" page. In the example below, this page is called
AddOrderRecordWithAllSupplierItems. Be sure to include a "Master-detail" table for the Order Details table. Build and
run the application and observe the default behavior.
Step 3: Use the tags Properties dialog to modify the "New" button on the Orders Show Table page to use your new
page:
Change the RedirectURL property to the name of your new Add page, e.g.
AddOrderRecordWithAllSupplierItems.aspx.
Step 4: Use an HTML editor to add two new elements to the layout page file for your new Add page
(AddOrderRecordWithAllSupplierItems.html).
The first element will be an "Add Group" button, and the second element will be a drop down list that presents the
Suppliers from which you want to add products to the new order. These two elements should be placed together next
to the existing "Add" button on the child table. Here's a fragment of HTML with the new elements:
:
<tr>
<td class="button_bar_cell">
<GEN:BUTTON FILE="../OtherComponents/Button-Everest.html" NAME="AddButtonBar"></GEN:BUTTON>
</td>
<td class="button_bar_cell">
<GEN:BUTTON FILE="../OtherComponents/Button-Everest.html" NAME="AddGroupButton"></GEN:BUTTON>
</td>
<td class="button_bar_cell">
<asp:DropDownList runat="server" ID="SupplierList" />
</td>
</tr>
:
Step 5: Set the new AddGroupButtons properties so that it emits a custom action when clicked.
Tag Property
Setting
AddGroupButton
Button Text
True
Action
Custom
Custom action
AddSupplierItems
z Page 614
Tag Property
Setting
Page
Step 6: Customize the "Safe" class for the new Add page (e.g. AddOrderRecordWithAllSupplierItems.aspx.safe.vb)
by adding the following two declarations to the page's class definition (AddOrderRecordWithAllSupplierItems):
Protected WithEvents SupplierList As DropDownList
Private Const PLEASE_SELECT As String = "** Please Select **"
Add the following two methods to the class definition. The first populates the Supplier drop down list. The second
handles the new "AddSupplierItems" command that was defined when setting the new Add Group buttons properties.
' This function populates the new Supplier Drop Down List with all values from the Suppliers table
Private Sub PopulateSupplierPulldown(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
SupplierList.DataBinding
' retrieve all the suppliers
Dim suppliers As ArrayList
Dim su As New SuppliersAccess()
' create an "OrderBy" object so that the Suppliers list is alphabetized by SupplierName
Dim orderByAscending As New IronSpeed.Base.Data.SqlBuilderSortOrder(False, False)
orderByAscending.AddColumn(su.CompanyNameColumn, _
IronSpeed.Base.Data.SqlBuilderSortDirection.OrderDir.Asc)
' build a sorted ArrayList of Suppliers Records
suppliers = su.GetList(Nothing, orderByAscending, 0, Integer.MaxValue)
add the "Please Select" option
Dim sr As SuppliersRecord
Dim li As New ListItem()
li.Text = PLEASE_SELECT
li.Value = Nothing
SupplierList.Items.Add(li)
' add each supplier to the new DropDownList
For Each sr In suppliers
li = New ListItem()
li.Text = sr.GetCompanyNameFieldValue()
li.Value = sr.GetID.ToDisplayString()
SupplierList.Items.Add(li)
Next
End Sub
'' override the Iron Speed event handler so we can intercept the event associated
z Page 615
z Page 616
End Sub
Step 7: Finally, add the following function to the second "inside" class defined in the Safe file (CustomTableControl).
' expose the Table Control's AddRecord method to the OnIronSpeedEvent handler
Public Shadows Function AddRecord(ByVal r As IronSpeed.Base.IRecord) As IronSpeed.Base.IRecord
MyBase.AddRecord(r)
End Function
The URL-decoded value of the Categories parameter is: <key CategoryID="2" />. This means that the primary key of
the record is defined by the CategoryID column, and for this record the value is 2. For records with composite primary
keys, you would see other attributes in the XML representing the names and values of the other primary key columns.
You can parse and use the XML-encoded value for your own purposes using a Page_Load function in your page.
Procedure
Step 1: Locate and open the safe class of the page containing the URL you wish to parse, e.g.:
\Apps\MyPage.safe.aspx.vb
Step 2: Add the following code inside the pages safe class:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If (Not Me.IsPostBack) Then
'Get the XML-encoded record ID from the URL parameter
'This will return something like: <key CategoryID="2" />
Dim strRecordId As String = IronSpeed.Base.Utils.NetUtils.GetUrlParam(Me, "Categories", True)
'Parse the XML-encoded string and return a KeyValue object
Dim keyVal As IronSpeed.Base.Data.KeyValue
If Not IsNothing(strRecordId) Then
keyVal = IronSpeed.Base.Data.KeyValue.XmlToKey(strRecordId)
End If
'Call KeyValue functions to pull out the data you want
Dim categoryID As Integer = CInt(keyVal.ColumnValueByName("CategoryID"))
End If
End Sub
z Page 617
Step 3: Build and run the application. You now have access to the record identifier passed in the URL.
z Page 618
Filtering Data
Sorting Data
z Page 619
Procedure
Step 1: Locate and open any safe class in your application, e.g.:
\Apps\Tutorial\DataAccess\ProductsAccess.safe.vb
Step 2: Add the following code inside the safe class:
Public Shared Sub AddProductRecord()
'Create an empty record
Dim r As New ProductsRecord()
'Set the fields of the new record
r.SetCategoryIDFieldValue("1")
r.SetDiscontinuedFieldValue(CType(Nothing, String))
r.SetReorderLevelFieldValue(CType(Nothing, String))
r.SetSupplierIDFieldValue(1)
r.SetUnitPriceFieldValue(1)
r.SetUnitsOnOrderFieldValue(1)
'insert the new record into the database
r.Create()
End Sub
Step 2 (alternate method): Add the following code inside the safe class:
Public Shared Sub AddProductRecord()
'Create an empty record
Dim r As ProductsRecord = _
CType(ProductsAccess.Instance.CreateRecord("aTemporaryId"), ProductsRecord)
'Set the fields of the new record
r.SetCategoryIDFieldValue("1")
r.SetDiscontinuedFieldValue(CType(Nothing, String))
r.SetReorderLevelFieldValue(CType(Nothing, String))
r.SetSupplierIDFieldValue(1)
r.SetUnitPriceFieldValue(1)
r.SetUnitsOnOrderFieldValue(1)
'Retrieve (not create) the same new record using the tempID
Dim r2 As ProductsRecord = _
CType(ProductsAccess.Instance.CreateRecord("aTemporaryId"), ProductsRecord)
'Reset some of the fields of the new record
r2.SetValue(New ColumnValue(2), ProductsAccess.Instance.UnitPriceColumn)
r2.SetString("2", ProductsAccess.Instance.UnitsOnOrderColumn)
z Page 620
Step 3: Add code to your application that calls the function you just added. Since the function is Public Shared, it can
be called from any class in your application.
Step 4: Build and run the application.
Step 2 (alternate method): Add the following code inside the safe class:
'This function opens a Transaction, updates a Products record, and commits the Transaction.
Public Shared Sub UpdateProductRecord()
Dim t As IronSpeed.Base.Data.SqlProvider.SqlTransaction
Try
'Create/obtain a transaction object
t = IronSpeed.Base.Data.SqlProvider.SqlTransaction.GetTransactionObject("ProductsAccess")
'Get an existing record with ID 1
Dim r As ProductsRecord = ProductsAccess.Instance.GetRecord("1", True)
'Update the fields of the record
z Page 621
r.SetUnitPriceFieldValue(1)
r.SetUnitsOnOrderFieldValue(1)
'Commit the transaction
t.Commit()
Catch e As Exception
Rollback the transaction
t.Rollback()
Finally
'Release the transaction
IronSpeed.Base.Data.SqlProvider.SqlTransaction.ReturnTransactionObject(t, True)
End Try
End Sub
Step 3: Add code to your application that calls the function you just added. Since the function is Public Shared, it can
be called from any class in your application.
Step 4: Build and run the application.
z Page 622
3. Click OK.
Step 4: Create a user interface (or command line execution function) for the Windows application.
Step 5: Add the following code inside any class in the Windows application:
Imports Tutorial
'This function opens a Transaction, updates a Products record, and commits the Transaction.
Public Shared Sub UpdateProductRecord()
Dim t As IronSpeed.Base.Data.SqlProvider.SqlTransaction
Try
'Create/obtain a transaction object
t = IronSpeed.Base.Data.SqlProvider.SqlTransaction.GetTransactionObject("MyWindowsApp")
'Get an existing record with ID 1
Dim r As ProductsRecord = ProductsAccess.Instance.GetRecord("1", True)
'Update the fields of the record
r.SetUnitPriceFieldValue(1)
r.SetUnitsOnOrderFieldValue(1)
'Commit the transaction
t.Commit()
Catch e As Exception
'Rollback the transaction
t.Rollback()
Finally
'Release the transaction
IronSpeed.Base.Data.SqlProvider.SqlTransaction.ReturnTransactionObject(t, True)
End Try
End Sub
Step 6: Add code to your application that calls the function you just added. Since the function is Public Shared, it can
be called from any class in your application. For example, you could call the function when a button is clicked.
Step 7: Build and run the application.
z Page 623
Generated Page
Procedure
Step 1: Locate and open the TableAccess safe class file you wish to modify, e.g.:
\Apps\Tutorial\DataAccess\ProductsAccess.safe.vb
Step 2: Add the following code inside the TableAccess safe class:
'A custom column class that only accepts positive currency values
'and has a special "display" format
<Serializable()> Public Class PositiveCurrencyColumn
Inherits IronSpeed.Base.Data.CurrencyColumn
Public Sub New(ByVal col As IronSpeed.Base.Data.CurrencyColumn)
MyBase New(col.Number, _
col.InternalName, _
col.Name, _
col.TableDefinition, _
Nothing, _
Nothing _
)
Me.IsIdentity = col.IsIdentity
Me.DbDataType = col.DbDataType
Me.DefaultValue = col.DefaultValue
Me.DatabaseDefaultValue = col.DatabaseDefaultValue
Me.DisplayFormat = col.DisplayFormat
Me.DbFormat = col.DbFormat
Me.IsRequired = col.IsRequired
Me.IsIndexed = col.IsIndexed
Me.IsUnique = col.IsUnique
Me.IsValuesReadOnly = col.IsValuesReadOnly
Me.IsValuesComputed = col.IsValuesComputed
'Me.Precision = col.Precision
'Me.Scale = col.Scale
'Me.SetConstraintString(col.GetConstraintString())
End Sub
z Page 624
Step 3: Add the following code inside the TableAccess safe class:
'overridden to customize this object's TableDefinition's ColumnList
Protected Overrides Sub Initialize()
MyBase.Initialize()
'construct a custom column instance using the current UnitPriceColumn
Dim newCol As New PositiveCurrencyColumn(Me.UnitPriceColumn)
'replace the UnitPriceColumn with the custom column instance
Dim i As Integer = Me.TableDefinition.ColumnList.IndexOf(Me.UnitPriceColumn)
Me.TableDefinition.ColumnList.Item(i) = newCol
End Sub
z Page 625
Procedure
Step 1: Locate and open the table SQL Access safe class, e.g.:
\MyApp\DataAccess\ProductSqlAccess.safe.vb
Step 2: Override the CreateRecord () function in the SQL Data Access class. Update the blocks of code having a
SPECIFY: comment, respectively for stored procedure name and parameter list.
' This class was generated by Iron Speed Designer.
'
' This is a "generated" class, meaning that is regenerated
' whenever necessary. It is not safe to add custom code to this
' class as customizations will be lost when the class is regenerated.
Imports IronSpeed.Base.Data
Imports IronSpeed.Base.Data.SqlProvider
Public Class ProductSqlAccessGen
Inherits SqlDynamicTableAccess
Public Sub New(ByVal tableDefinition As TableDefinition, _
ByVal connectionName As String, _
ByVal applicationName As String)
Me.tableProperties = tableDefinition
Me.connectionName = connectionName
Me.applicationName = applicationName
ReDim columnValues(tableProperties.ColumnList.Count - 1)
ReDim columnChanged(tableProperties.ColumnList.Count - 1)
Me.IsValid = True
Me.IsDirty = False
Me.IsWritable = True
Me.ParticipateInTransaction = False
End Sub
Public Overrides Function NewInstance() As SqlTableAccess
Return New ProductSqlAccessGen(Me.tableProperties, _
Me.connectionName, _
Me.applicationName)
End Function
'*******************************************************
'' <summary>
'' OVERRIDE THE FUNCTION THAT Creates a new record.
z Page 626
'' </summary>
'' <returns></returns>
Public Overloads Overrides Function CreateRecord() As IronSpeed.Base.Data.KeyValue
' SPECIFY: your stored procedure name
Dim procName As String = "upProductAdd"
Try
' Get a connection, command, and transaction
Dim myConnection As IDbConnection = Me.GetTransaction().GetADOConnectionByName(Me.connectionName)
Dim myTransaction As IDbTransaction = Me.GetTransaction().GetADOTransaction(myConnection)
Dim myCommand As IDbCommand = IronSpeed.Base.Data.SqlProvider.SqlProvider.GetCommand(procName, _
myConnection)
myCommand.Transaction = myTransaction
' Mark the command as a stored procedure
myCommand.CommandType = CommandType.StoredProcedure
Dim obj As Object
Dim param As IDataParameter
Dim paramName As String
Dim paramType As Object
Dim outputParams As ArrayList = New ArrayList
' Set the parameters
Dim productAccess As ProductAccess = productAccess.Instance
Dim col As BaseColumn
z Page 627
z Page 628
Me.ParticipateInTransaction = True
Me.GetTransaction().ListCache.Clear()
'Add to the transaction's object cache
Me.GetTransaction().ObjectCache.Remove(Me.GetHashCode())
Me.GetTransaction().ObjectCache.Add(Me.GetHashCode(), Me)
Return Me.GetID()
Catch e As System.Exception
Me.IsValid = False
Dim e2 As System.Exception = IronSpeed.Base.Data.SqlProvider.SqlProvider.ConvertDBException(e, _
"Unable to create record. ")
Throw e2
End Try
End Function
End Class
z Page 629
Dim dt As DataTable =
ProductsAccess.Instance.CreateDataTable(CType(productsList.ToArray(GetType(ProductsRecord)), ProductsRecord()),
Nothing)
DataGrid1.DataSource = dt
DataGrid1.DataBind()
End If
Filtering Data
In this section:
z Page 630
Step 2 (alternate method): Add the following code inside the pages safe CustomTableControl class, located in the
same file as the pages safe class:
'This Handler modifies the control's DataReader after it is created
Private Sub Page_DataReaderCreated(ByVal source As Object, ByVal args As System.EventArgs) _
Handles MyBase.DataReaderCreated
Dim dr As IronSpeed.Base.Data.DataReader = Me.GetDataReader()
Dim subfilter As IronSpeed.Base.Data.CompoundFilter = CreateSubfilter()
dr.GetFilter().AddFilter("subfilter1", subfilter)
End Sub
'This Sub creates a simple CompoundFilter that matches only Products with ((UnitPrice < 20) OR (UnitPrice >= 10))
Private Shared Function CreateSubfilter() As IronSpeed.Base.Data.CompoundFilter
'Create a CompoundFilter that uses the OR operator
Dim filter As New
IronSpeed.Base.Data.CompoundFilter(IronSpeed.Base.Data.CompoundFilter.CompoundingOperators.Or_Operator)
'Add subfilters to the CompoundFilter
filter.AddFilter( _
New IronSpeed.Base.Data.ColumnValueFilter( _
ProductsAccess.Instance.UnitPriceColumn, _
z Page 631
"20", _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Less_Than, _
False))
filter.AddFilter( _
"subsubfilter2", _
New IronSpeed.Base.Data.ColumnValueFilter( _
ProductsAccess.Instance.UnitPriceColumn, _
"25", _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Greater_Than_Or_Equal, _
False))
Return filter
End Function
Step 2 (alternate method): Add the following code inside the pages safe CustomTableControl class, located in the
same file as the pages safe class:
'This Sub is overridden to perform additional initialization of the control's DataReader
Protected Overrides Sub InitializeDataReader(ByVal dr As IronSpeed.Base.Data.DataReader)
MyBase.InitializeDataReader(dr)
Dim subfilter As IronSpeed.Base.Data.CompoundFilter = CreateSubfilter()
dr.GetFilter().AddFilter("subfilter1", subfilter)
End Sub
'This Sub creates a simple CompoundFilter that matches only Products with ((UnitPrice < 20) OR (UnitPrice >= 10))
Private Shared Function CreateSubfilter() As IronSpeed.Base.Data.CompoundFilter
'Create a CompoundFilter that uses the OR operator
Dim filter As New
IronSpeed.Base.Data.CompoundFilter(IronSpeed.Base.Data.CompoundFilter.CompoundingOperators.Or_Operator)
'Add subfilters to the CompoundFilter
filter.AddFilter( _
New IronSpeed.Base.Data.ColumnValueFilter( _
ProductsAccess.Instance.UnitPriceColumn, _
"20", _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Less_Than, _
False))
filter.AddFilter( _
"subsubfilter2", _
New IronSpeed.Base.Data.ColumnValueFilter( _
ProductsAccess.Instance.UnitPriceColumn, _
"25", _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Greater_Than_Or_Equal, _
False))
Return filter
End Function
z Page 632
z Page 633
)
sb.Append(vbCrLf) 'append a line break
'construct a DataReader Filter that will match only Products
'whose FK to the Categories table matches the current Category's ID.
Dim f As New IronSpeed.Base.Data.ForeignKeyValueFilter( _
productCategoryFk, _
categoryRecord.GetID(), _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Equals)
'Get a filtered list of the first 20 Products records in the current category
'(using the Filter constructed above)
Dim productRecords As ArrayList = ProductsAccess.Instance.GetList( _
f, _
Nothing, _
0, 20, Nothing)
Dim productRecord As ProductsRecord
For Each productRecord In productRecords
'Get data from the ProductsRecord
Dim productName As String = productRecord.GetProductNameFieldValue()
Dim productIdString As String = productRecord.GetString(ProductsAccess.Instance.ProductIDColumn)
Dim productIdKey As IronSpeed.Base.Data.KeyValue = productRecord.GetID()
Dim categoryIdKey2 As IronSpeed.Base.Data.KeyValue = productRecord.GetValue(productCategoryFk)
'update the StringBuilder
sb.AppendFormat( _
"- + {0} ({1}, {2}, {3})", _
productName, _
productIdString, _
productIdKey.ToString(), _
categoryIdKey2.ToString() _
)
sb.Append(vbCrLf) 'append a line break
Next
Next
Return sb.ToString()
End Function
Step 3: Add code to your application that calls the function you just added. Since the function is Public Shared, it can
be called from any class in your application.
Step 4: Build and run the application.
z Page 634
z Page 635
ProductsAccess.Instance.UnitPriceColumn, _
"20", _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Less_Than, _
False))
filter.AddFilter( _
"subsubfilter2", _
New IronSpeed.Base.Data.ColumnValueFilter( _
ProductsAccess.Instance.UnitPriceColumn, _
"25", _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Greater_Than_Or_Equal, _
False))
Return filter
End Function
Public Overloads Overrides Function GetList( _
ByVal filter As IronSpeed.Base.Data.BaseFilter, _
ByVal orderBy As IronSpeed.Base.Data.SqlBuilderSortOrder, _
ByVal pageNumber As Integer, _
ByVal batchSize As Integer, _
Optional ByRef totalRows As Integer = 0 _
) As System.Collections.ArrayList
Dim combinedfilter As IronSpeed.Base.Data.CompoundFilter = CombineFilters(CreateSubfilter(), filter)
Return MyBase.GetList(combinedfilter, orderBy, pageNumber, batchSize, totalRows)
End Function
Public Overloads Overrides Function GetStats( _
ByVal selectCol As IronSpeed.Base.Data.SqlBuilderColumnSelection, _
ByVal filter As IronSpeed.Base.Data.BaseFilter, _
ByVal orderBy As IronSpeed.Base.Data.SqlBuilderSortOrder, _
ByVal pageNumber As Integer, _
ByVal batchSize As Integer _
) As String
Dim combinedfilter As IronSpeed.Base.Data.CompoundFilter = CombineFilters(CreateSubfilter(), filter)
Return MyBase.GetStats(selectCol, combinedfilter, orderBy, pageNumber, batchSize)
End Function
Public Overloads Overrides Function DrillDown( _
ByVal selectCol As IronSpeed.Base.Data.SqlBuilderColumnSelection, _
ByVal filter As IronSpeed.Base.Data.BaseFilter, _
ByVal orderBy As IronSpeed.Base.Data.SqlBuilderSortOrder _
) As String()
Dim combinedfilter As IronSpeed.Base.Data.CompoundFilter = _
CombineFilters(CreateSubfilter(), filter)
Return MyBase.DrillDown(selectCol, combinedfilter, orderBy)
End Function
z Page 636
Primary key
addressDesc
address description
addressTypeId
addressType
addressTypeId
Primary key
addressTypeDesc
addressTypeStatus
status; integer
Procedure
Step 1: Using the Application Builder, create an Add Address Record page or an Edit Address Record page.
Alternatively, you can create one by hand.
Step 2: Set the properties for the addressTypeStatusFieldValue FieldValue tag.
z Page 637
Tag Property
Setting
addressTypeStatusFieldValue
Display style
Dropdown List
Step 3: In the Properties tab of the tags Properties dialog, set the AutoGenerateItems pass-through attribute to False.
This will prevent Iron Speed BaseClasses from automatically populating the dropdown list, since the example will
populate the dropdown in a custom fashion.
Name
Value
addressTypeStatusFieldValue
AutoGenerateItems
False
Step 4: Build the application. This creates the safe class files used in the next step.
Step 5: Using a text editor or Visual Studio .NET, edit the pages safe class, similar to the file below. Modify the
CustomRecordControl class.
' This class was generated by Iron Speed Designer.
'
' This is a "safe" class, meaning that it is generated once
' and never overwritten. Any custom code you add to this class
' will be preserved when you regenerate your application.
'
' Typical customizations that may be done in this class include
' - adding custom event handlers
' - overriding base class methods
Public Class AddaddressRecord
Inherits AddaddressRecordGen
End Class
Namespace PanelControls.AddaddressRecord
'This control class can be customized to change the behavior of any
'instances instantiated/used by this page/panel.
Public Class CustomTableControl
Inherits IronSpeed.Base.Web.UI.WebControls.TableControl
'Protected Overrides Sub InitializeDataReader(ByVal dr As IronSpeed.Base.Data.DataReader)
'End Sub
z Page 638
z Page 639
True)
' get all the records having status > 0
Dim myAddressTypeRecords As ArrayList = myAddressTypeAccess.GetList( _
addressTypeStatusGreaterThanZeroFilter, _
Nothing, _
0, _
100)
' this is the field value control we are currently modifying; it is a DropDownList
Dim dropdown As IronSpeed.Base.Web.UI.WebControls.DropDownList = CType(fvc, _
IronSpeed.Base.Web.UI.WebControls.DropDownList)
' keep the "Please Select", clear all other values in dropdown
Dim pleaseSelectItem As ListItem = dropdown.Items(0)
dropdown.Items.Clear()
dropdown.Items.Add(pleaseSelectItem)
' populate the field value dropdown with valid values
(i.e. with status > _u44 ? from myAddressTypeRecords above)
If (Not IsNothing(myAddressTypeRecords) AndAlso myAddressTypeRecords.Count > 0) Then
Dim myAddressTypeRecord As AddressTypeRecord
Dim key As IronSpeed.Base.Data.KeyValue
Dim addressTypeId As String
Dim addressTypeDescription As String
' add each valid addressTypeId into the drop down list
For Each myAddressTypeRecord In myAddressTypeRecords
If (Not IsNothing(myAddressTypeRecord)) Then
' get the primary key of the record
key = myAddressTypeRecord.GetID()
' get the underlying addressTypeId
addressTypeId = key.GetColumnValue(myAddressTypeAccess.addressTypeIdColumn).ToString()
' get the description of the record
addressTypeDescription = myAddressTypeRecord.GetaddressTypeDescFieldValue()
' add a new ListItem to the dropdown with above description and Id
dropdown.Items.Add(New ListItem(addressTypeDescription, addressTypeId))
End If
Next
End If
End If
End If
End Sub
End Class
z Page 640
End Namespace
Step 3: Add the following to the Order Items Show Table pages safe code-behind
(ShowOrder_DetailsTable.safe.aspx.vb):
A Sub PopulateCustomerFilter().
z Page 641
'
' This is a "safe" class, meaning that it is generated once
' and never overwritten. Any custom code you add to this class
' will be preserved when you regenerate your application.
'
' Typical customizations that may be done in this class include
' - adding custom event handlers
' - overriding base class methods
Public Class ShowOrder_DetailsTable
Inherits ShowOrder_DetailsTableGen
' dropdown list filter for customer id
Protected WithEvents V_CustomerIDFieldFilter As DropDownList
' public property for V_CustomerIDFieldFilter
Public Overridable ReadOnly Property P_CustomerIDFieldFilter() As DropDownList
Get
Return Me.V_CustomerIDFieldFilter
End Get
End Property
Private Sub ShowOrder_DetailsTable_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
MyBase.Load
If (Not Me.IsPostBack()) Then
' when this page is first loaded, populate the customer filter
PopulateCustomerFilter()
End If
End Sub
' this sub will populate the customer filter dropdown
Private Sub PopulateCustomerFilter()
Me.P_CustomerIDFieldFilter.Items.Clear()
Dim customerName As String
Dim customerId As String
Dim customerAccess As CustomersAccess = CustomersRecord.TableUtils
Dim customerRecord As CustomersRecord
Dim customerAL As ArrayList = customerAccess.GetList(Nothing, Nothing, 0, 10000)
Me.P_CustomerIDFieldFilter.Items.Add(New ListItem("Please Select", ""))
If (Not IsNothing(customerAL) AndAlso customerAL.Count > 0) Then
For Each customerRecord In customerAL
customerName = customerRecord.GetContactNameFieldValue()
customerId = customerRecord.GetCustomerIDFieldValue()
Me.P_CustomerIDFieldFilter.Items.Add(New ListItem(customerName, customerId))
Next
End If
z Page 642
End Sub
Private Sub V_CustomerIDFieldFilter_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles V_CustomerIDFieldFilter.SelectedIndexChanged
' if the customer ID record changed, select the "Please select" of the Order ID filter
P_OrderIDFieldFilterDropDownList.SelectedIndex = 0
' make the Order ID trigger a search event, to filter the Order ID column using "Please Select", i.e. show all records
P_OrderIDFieldFilter.OnIronSpeedEvent(New IronSpeed.Base.IronSpeedEventArgs(Nothing, _
IronSpeed.Base.IronSpeedEventArgs.EventTypes.Search, Nothing, Nothing))
' get the table object, and make it databind on these records
Dim myTable As PanelControls.ShowOrder_DetailsTable.CustomTableControl = CType(v_table, _
PanelControls.ShowOrder_DetailsTable.CustomTableControl)
' update the order filter
myTable.UpdateOrderFilter(V_CustomerIDFieldFilter.SelectedItem.Value)
' data bind
myTable.DataBind()
End Sub
End Class
Namespace PanelControls.ShowOrder_DetailsTable
'This control class can be customized to change the behavior of any
'instances instantiated/used by this page/panel.
Public Class CustomTableControl
Inherits IronSpeed.Base.Web.UI.WebControls.TableControl
'Protected Overrides Sub InitializeDataReader(ByVal dr As IronSpeed.Base.Data.DataReader)
'End Sub
'Protected Overrides Sub ModifyRedirectUrl(ByVal args As IronSpeed.Base.IronSpeedEventArgs)
'End Sub
'Private Sub CustomTableControl_DataReaderCreated(ByVal source As Object, ByVal args As System.EventArgs) _
Handles MyBase.DataReaderCreated
'End Sub
'Private Sub CustomTableControl_PageIndexChanging(ByVal sender As Object, ByVal e As _
System.ComponentModel.CancelEventArgs) Handles MyBase.PageIndexChanging
'End Sub
' get the list of order id's for the customerId
Private Function GetCustomersOrderIds(ByVal customerId As String) As ArrayList
' array list of order id's for a given customer
Dim orderIdsForCustomer As ArrayList
z Page 643
z Page 644
z Page 645
Enterprise generates a set of stored procedures for each table used by your application. There is a one-to-one
correspondence between the functions overridden in the example above (the TableAccess classs functions) and the
statements or stored procedures generated by Iron Speed Designer. In Iron Speed Designer Enterprise Edition, the
PhysicalTableAccess.getList() function calls a stored procedure called
p<APP NAME><TABLE>GetList()
Here's an example of a stored procedure function signature.
CREATE PROCEDURE pTest1titlesGetList
@p_join_str varchar(255),
@p_where_str varchar(4000),
@p_sort_str varchar(4000),
@p_page_number int,
@p_batch_size int
AS
BEGIN
... build and execute query ...
END
The middle-tier filters set the p_where_str parameter value. For example, it would include
"WHERE product_id=XXX"
The body of the stored procedure assembles the entire SQL query and then executes it. So you can view this
approach as filtering at the database level because the data is actually filtered by a stored procedure (for Enterprise) or
SQL statement (for Professional).
Sorting Data
In this section:
z Page 646
z Page 647
Step 2 (alternate method): Add the following code inside the pages safe CustomTableControl class, located in the
same file as the pages safe class:
'This Handler modifies the control's DataReader after it is created
Private Sub Page_DataReaderCreated(ByVal source As Object, ByVal args As System.EventArgs) _
Handles MyBase.DataReaderCreated
Dim dr As IronSpeed.Base.Data.DataReader = Me.GetDataReader()
z Page 648
Step 2 (alternate method): Add the following code inside the pages safe CustomTableControl class, located in the
same file as the pages safe class:
'This Sub is overridden to perform additional initialization of the control's DataReader
Protected Overrides Sub InitializeDataReader(ByVal dr As IronSpeed.Base.Data.DataReader)
MyBase.InitializeDataReader(dr)
'Make sure the Records are always sorted by ProductName (ascending)
dr.GetAlwaysSortBy().AddColumn(ProductsAccess.Instance.ProductNameColumn, _
IronSpeed.Base.Data.SqlBuilderSortDirection.OrderDir.Asc)
'Make sure the Records are initially sorted by UnitPrice (descending)
dr.GetSortBy().AddColumn(ProductsAccess.Instance.UnitPriceColumn, _
IronSpeed.Base.Data.SqlBuilderSortDirection.OrderDir.Desc)
End Sub
z Page 649
responsible for saving field values for the record. The overridden SetValue() method updates the database record with
the audit trail information in addition to the regular field value being saved.
For this example, assume there is a Products table in your application with the following fields (in addition to the other
product-related fields), and you want to update these fields whenever a record is created or updated.
Field Name
Field Type
CreatorId
Number
UpdaterId
Number
CreateDate
Date
UpdateDate
Date
Procedure
Step 1: Locate and open the safe data access class in your application, e.g.:
\MyApp\ DataAccess\ProductsRecord.safe.vb
Step 2: Override the SetValue() function inside the safe class:
'This function is called to set the value of each individual column
'of a particular record when creating or updating the record.
Public Overloads Overrides Sub SetValue(ByVal val As ColumnValue, ByVal col As BaseColumn)
'First call the base function
MyBase.SetValue(val, col)
'Get the current date
Dim currentDate As DateTime = DateTime.Now
'Get the signed in user name
Dim signedInUserId As String = GetSignedInUserID()
'Check if we are in the process of creating a new record.
'If so, the call to GetID() will return nothing
If (IsNothing(Me.GetID())) Then
'Set values for CreatorId and CreateDate
If Not Me.TableUtils.CreatorIdColumn.Equals(col) AndAlso Not Me.TableUtils.CreateDateColumn.Equals(col) Then
Me.SetCreatorIdFieldValue(signedInUserId)
Me.SetCreateDateFieldValue(currentDate)
End If
Else
'We are in update mode so set values for UpdaterId and UpdateDate
If Not Me.TableUtils.UpdaterIdColumn.Equals(col) AndAlso Not Me.TableUtils.UpdateDateColumn.Equals(col) Then
Me.SetUpdaterIdFieldValue(signedInUserId)
z Page 650
Me.SetUpdateDateFieldValue(currentDate)
End If
End If
End Sub
Private Function GetSignedInUserID() As String
'Get the signed-in user name from the session.
'If you have implemented your own role-based security,
'implement your own logic here.
Dim sessionData As Hashtable = CType(HttpContext.Current.Session.Item(SessionConst.LoginInfo), Hashtable)
If Not IsNothing(sessionData) AndAlso Not IsNothing(sessionData.Item(SessionConst.UserID)) Then
Dim userId As String = CStr(sessionData.Item(SessionConst.UserID))
Return userId
End If
Return Nothing
End Function
z Page 651
z Page 652
z Page 653
The EnforceAccessRequirements method generated for every page created by Iron Speed Designer is used to add
Windows Authentication. The EnforceAccessRequirements method supports the role-based security system
generated by Iron Speed Designer. Since EnforceAccessRequirements exists for every page, you might consider
modifying the underlying EnforceAccessRequirements on the BasePage class in the Iron Speed Base Classes library
for a more global implementation.
While this example is specific to Windows Authentication, you can similarly integrate your application with LDAP.
Procedure
Step 1: The first step is to configure the Microsoft IIS web server so that your application can only be accessed by
Windows Domain Users.
Run the Internet Information Services manager: Control Panel -> Administrative Tools -> Internet Information
Services. Navigate to your applications virtual directory, right-click to select the Properties window, and select the
Directory Security tab.
z Page 654
Click Edit to display the Anonymous access and authentication control dialog. Make sure Anonymous access is
unchecked and Integrated Windows authentication is checked.
z Page 655
\MyApp\MyPages\ShowMyTableTable.safe.aspx.vb
Step 4: To restrict page access to a set of Windows Domain Groups, override the EnforceAccessRequirements()
function in the pages safe class and implement custom role-checking logic:
Imports System.Security.Principal
Imports System.Threading
Public Class ShowMyTableTable
Inherits ShowMyTableTableGen
Protected Overrides Sub EnforceAccessRequirements(ByVal loginRequired As String)
'NOTE: if role-based security was configured through Iron Speed Designer,
'and the page was configured to allow specific roles, those roles will be
'passed to this function in the loginRequired parameter as a
'semi-colon-delimited list of values: Role1;Role2;etc.
'For this windows-authentication example, however, we assume that
'role-based security was not configured through Iron Speed Designer,
'so we can ignore the loginRequired parameter.
Dim accessAllowed As Boolean = False
'If IIS has been set up for Integrated Windows authentication
'and if this application is configured for Windows authentication via Web.config:
'
' <system.web>
' <authentication mode="Windows" />
' </system.web>
'
'then we can get a WindowsPrincipal object from the current Http context
Dim user As WindowsPrincipal = CType(HttpContext.Current.User, WindowsPrincipal)
If Not IsNothing(user) Then
'Check for allowable roles. You can pass a role string
'or you can use WindowsBuiltInRole enum values
If user.IsInRole("MyDomain\Accounting") Then
accessAllowed = True
ElseIf user.IsInRole(WindowsBuiltInRole.Administrator) Then
accessAllowed = True
End If
End If
If Not accessAllowed Then
'Access is not allowed for this user so redirect to the forbidden page
z Page 656
Me.RedirectToForbiddenPage()
End If
End Sub
End Class
The page headers need to display a greeting such as, "Hello [first name]".
A user belongs to a site and you want to filter all the data on the pages based on his site, rather than on the
LoggedInUserId() function.
In these cases, you can refer to the "extra information" in the session, e.g.
Session("firstName")
Session("lastName")
Procedure
Step 1: Open the Sign-in control's safe class, e.g.:
\<Application Folder>\OtherComponents\SignIn_Control.safe.ascx.vb
Step 2: Edit the Login Sub, replacing or modifying the code below between the "[BEGIN]: adding more info to
session" and "[END]: adding more info to session" markers.
'Performs the login
Private Sub Login(ByVal redirectOnSuccess As Boolean)
Dim strUserName As String = Me.UserName.Text
Dim strPassword As String = Me.Password.Text
'Check if user entered the user name and password.
If (strUserName = "" Or strPassword = "") Then
Call LoginFailed(ERR_INVALID_LOGIN_INFO, strUserName)
End If
Dim clientIPAddress As String = _
Request.ServerVariables("REMOTE_ADDR") & " (HTML)"
Dim strUserId As String = ""
Dim strUserTable As String
Dim bSuccess As Boolean = False
z Page 657
Try
'SetLoginInfo will do the work of
'authenticating the name and password
bSuccess = Me.SystemUtils.SetLoginInfo(strUserName, strPassword)
Catch e As System.Exception
LoginFailed(ERR_INTERNAL_ERROR, "")
End Try
'success!
If (bSuccess) Then
LogIronSpeedLoginEvent( _
"Login succeeded (" & _
strUserId & "," & _
strUserTable & "," & _
strUserName & ")", _
Diagnostics.EventLogEntryType.SuccessAudit, _
1)
' [BEGIN]: adding more info to session
Dim userId As String = Me.SystemUtils.GetUserID()
Dim userTableAccess As EmployeesAccess = EmployeesRecord.TableUtils
Dim pk As New IronSpeed.Base.Data.KeyValue()
pk.AddElement(userTableAccess.UserId.InternalName, userId)
Dim userRecord As EmployeesRecord = userTableAccess.GetRecord(pk, False)
Dim firstName As String = userRecord.GetFirstNameFieldValue()
Dim lastName As String = userRecord.GetLastNameFieldValue()
Session("firstName") = firstName
Session("lastName") = lastName
' [END]: adding more info to session
If redirectOnSuccess Then
If (Me.SuccessURL <> "") Then
Response.Redirect(Me.SuccessURL)
Else
CType(Me.Page, BasePage).RedirectBack(False)
End If
End If
Else
LoginFailed(ERR_INVALID_LOGIN_INFO, strUserName)
End If
End Sub
z Page 658
Adding code for event handling and report generation to a safe class.
This example uses an application thats based on the Northwind database that comes with Microsoft SQL Server.
Description
Attribute
Description
ShowProductsTable.html
Properties File
ShowProductsTable.xml
ProductsList.rpt
GEN:Button
z Page 659
Generated Pages
The modified
ShowProductsTable page with
the new Export to PDF button.
z Page 660
Procedure
Step 1: Create a standard Show Table page based on the Northwind Products table.
Step 2: Locate and open the layout page file, e.g.:
\<AppDirectory>\Source\Products\ShowProductsTable.html
Insert the new GEN:Button tag as shown above in its own <TD> cell. Use the same FILE= property as the other
buttons.
Step 3: Set the properties for the ExportToPDF tag in ShowProductsTable.aspx.
z Page 661
Tag Property
Setting
ExportToPDF
Button Text
Export to PDF
No
Action
Custom
Custom action
DisplayAsPDF
Page
Redirect URL
Redirect Parameters
Step 4: Locate and open the pages safe class, e.g.:
ShowProductsTable.safe.aspx.vb
If you are using Visual Studio, expand the ShowProductsTable.aspx node in the solution tree, and then expand the
ShowProductsTable.gen.aspx.vb node to display the safe class file, ShowProductsTable.safe.aspx.vb. Double click
on the safe class file to open it in the source code editor.
Step 5: Insert the following two lines at the top of the pages safe class file. These statements cause the necessary
Crystal Reports objects to be linked into your application.
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Step 6: Insert the following code into the (otherwise empty) ShowProductsTable class definition.
The OnIronSpeedEvent function implements an event handler that is called when the new Export to PDF
button is clicked.
The DisplayReportAsPDF function connects to the data base, populates the report, and then displays it in the
web browser.
' This method handles the IronSpeedEvent produced by the ExportToPDF button
Public Overrides Sub OnIronSpeedEvent(ByVal args As IronSpeed.Base.IronSpeedEventArgs)
' Handle the custom "DisplayAsPDF" command, but pass others off to the base class
If args.EventType = IronSpeed.Base.IronSpeedEventArgs.EventTypes.Custom AndAlso _
args.CustomEventName = "DisplayAsPDF" Then
'' create the report object and produce the report
z Page 662
z Page 663
Step 7: Open the project in Visual Studio by clicking on the applications generated .VBPROJ file. Click the Show All
Files icon at the top of the Solution Explorer pane so that the applications code behind files are added to the
Solution Explorer. Add the ProductsList.rpt file to the project by right-clicking on the Products folder in the Solution
Explorer pane, selecting Add Existing Item, and navigating to the ProductList.rpt file created by Crystal Reports.
z Page 664
z Page 665
Step 2: Make two minor changes to the Products Show Table pages "safe" code-behind
(ShowProductsTable.safe.aspx.vb) to load the file from disk rather than retrieving a project resource:
Change the report document object declaration from
Dim crReportDocument As New ProductsList()
to
Dim crReportDocument As New ReportDocument()
crReportDocument.Load(IronSpeed.Base.Configuration.ApplicationSettings.Current.AppRootPath() & _
"\Products\ProductsList.rpt")
Change the DisplayReportAsPDF subroutine signature to accommodate the changed parameter type, i.e. change
Sub DisplayReportAsPDF(ByVal reportObject As CrystalDecisions.CrystalReports.Engine.ReportClass)
to
Sub DisplayReportAsPDF(ByVal reportObject As CrystalDecisions.CrystalReports.Engine.ReportDocument)
z Page 666
Procedure
Step 1: Create an Edit Employees Page using the Application Builder (e.g., EditEmployeesRecord.html). A handcreated page could also be used.
Step 2: Modify the EditEmployeesRecord.html layout page file in a text editor and replace the FieldValue code
generation tag for the hire date:
<td class="dialog_field_value">
<GEN:FIELDVALUE NAME="HireDateFieldValue" TYPE="TextBox"></GEN:FIELDVALUE>
</td>
Step 3: Build the application. The safe class and generated class files will be created.
Step 4: Locate the pages safe class file, e.g.:
\MyApp\Employees\EditEmployeesRecord.safe.aspx.vb
Step 5: Add handling of hire date retrieval and hire date saving in the pages safe class. Add the Subs and Calendardeclaration similar to the following into the pages safe class:
z Page 667
z Page 668
z Page 669
to get its compilation settings. Add the DLL's to the comma-separated list of DLL's in the /reference section in the
CompileApplication.rsp, e.g.:
/reference:BaseClasses.dll,System.dll,System.Data.dll,System.Drawing.dll,System.Web.dll,System.Xml.dll,Interop.DTS.dll,In
terop.DTSCustTasks.dll,Interop.DTSPump.dll
In this example, the third-party DLL's are: DTS, DTSCustTasks , and DTSPump.
Step 2: Fully qualify the namespace for the classes from the third-party DLL's you wish to use in
CompileApplication.rsp.
Import the namespaces in the /imports: section. This will import the namespaces for the whole application.
Import the namespaces in individual classes (i.e. VB.NET classes in your applications) that make use of the
namespaces.
Fully-qualify the classes from the third-party DLL's when you make use of classes from these third-party DLL.
z Page 670
Procedure
Step 1: Create an application in Iron Speed Designer using the Application Builder. Be sure to use the table(s) for
which you wish to add a web service. This example uses the Shippers table in Northwind.
Step 2: Build and run the application.
Step 3: Add a reference to System.Web.Services.dll in the applications CompileApplication.rsp file. (This is ptional if
you are using Visual Studio .NET to compile the application, but required if you are using VBC to compile the
application.
\MyApp\CompileApplication.rsp
Step 4: Open application in Visual Studio .NET.
\MyApp\MyApplication.vbproj
Step 5: Add a Web Service to your application. (Add New Item, Web Service).
\MyApp\MyWebServiceDirectory\ShippersTableWebServices.asmx
Step 6: Switch the Web Service to code view, and add functions similar to the following to the Visual Basic.NET class
for the Web Service (ShippersTableWebServices.asmx.vb):
' Class to contain the data for a Shippers record
Public Class MyShipperRecord
Public shipperId As Integer
Public companyName As String
Public phone As String
End Class
' web service function to Add a Shippers record
' input: company name, phone number
' output: id of created record
<WebMethod()> Public Function AddShippersRecord(ByVal companyName As String, ByVal phone As String) As Integer
Dim createdShipperId As Integer
' Transaction object
Dim t As IronSpeed.Base.Data.SqlProvider.SqlTransaction
Try
' Create/obtain a transaction object
t = IronSpeed.Base.Data.SqlProvider.SqlTransaction.GetTransactionObject("ShippersAccess")
' Set up the record object
Dim shipperRecord As New ShippersRecord()
z Page 671
shipperRecord.SetCompanyNameFieldValue(companyName)
shipperRecord.SetPhoneFieldValue(phone)
' Create the object
shipperRecord.Create()
' Retrive the primary key of the record just created
Dim primaryKey As IronSpeed.Base.Data.KeyValue
primaryKey = shipperRecord.GetID()
createdShipperId =
CInt(primaryKey.ColumnValueByName(shipperRecord.TableUtils.ShipperIDColumn.InternalName))
' Commit the transaction
t.Commit()
Catch e As Exception
'Rollback the transaction
t.Rollback()
Finally
'Release the transaction
IronSpeed.Base.Data.SqlProvider.SqlTransaction.ReturnTransactionObject(t, True)
End Try
Return createdShipperId
End Function
z Page 672
z Page 673
myShipperRecord.phone = shipperRecord.GetPhoneFieldValue()
' Commit the transaction
t.Commit()
Catch e As Exception
'Rollback the transaction
t.Rollback()
Finally
'Release the transaction
IronSpeed.Base.Data.SqlProvider.SqlTransaction.ReturnTransactionObject(t, True)
End Try
Return myShipperRecord
End Function
z Page 674
\MyApp\<Application Name>.vbproj
Step 2: Add a Web Reference into the project to the Web Service in question.
http://localhost/AppWithWebService/MyWebServiceDirectory/ShippersTableWebServices.asmx
Step 3: Add a reference to System.Web.Services.dll in the applications CompileApplication.rsp file. This is optional if
you are using Visual Studio .NET to compile the application, but is required if you are using VBC to compile
application.
\MyApp\CompileApplication.rsp
Step 4: Override the Add Record, Delete Record, and Get Record functions in the tables SQLAccess data access
class to use the Web Services respective functions.
\MyApp\DataAccess\ShippersSqlAccess.safe.vb
Add the code similar to the following into the ShippersSqlAccessGen class.
' override the GetRecord which will call a stored-procedure, or create in-line SQL.
' instead, call a web service to Get a Shippers record
Protected Overloads Overrides Sub GetRecord()
Try
' establish which data access class to use
Dim tableDataAccess As ShippersAccess = ShippersRecord.TableUtils
' get the shipper ID that we want to Get
Dim shipperId As Integer =
CInt(primaryKeyValue.ColumnValueByName(tableDataAccess.ShipperIDColumn.InternalName))
' instantiate the object that will communicate with a web service
Dim webService As New ShippersTableWebServices
' call the web service's "GetRecord"
Dim myShipperRecord As MyShipperRecord = webService.GetShippersRecord(shipperId)
' set the values for the Record, based on the values retrived from the web service
Me.SetColumnValue(myShipperRecord.shipperId, tableDataAccess.ShipperIDColumn)
Me.SetColumnValue(myShipperRecord.companyName, tableDataAccess.CompanyNameColumn)
Me.SetColumnValue(myShipperRecord.phone, tableDataQccess.PhoneColumn)
' set the columns to columnChanged = False
Me.columnChanged(getcolumnindexbyname(tableDataAccess.ShipperIDColumn.InternalName)) = False
Me.columnChanged(getcolumnindexbyname(tableDataAccess.CompanyNameColumn.InternalName)) = False
Me.columnChanged(getcolumnindexbyname(tableDataAccess.PhoneColumn.InternalName)) = False
Me.IsDirty = False
Me.IsValid = True
z Page 675
Me.ParticipateInTransaction = True
Catch e As Exception
Throw e
End Try
End Sub
' override the DeleteRecord which will call a stored-procedure, or create in-line SQL.
' instead, call a web service to Delete a Shippers record
Public Overloads Overrides Sub DeleteRecord(ByVal key As IronSpeed.Base.Data.KeyValue)
Try
' establish which data access class to use
Dim tableDataAccess As ShippersAccess = ShippersRecord.TableUtils
' get the shipper ID that we want to Delete
Dim shipperId As Integer =
CInt(primaryKeyValue.ColumnValueByName(tableDataAccess.ShipperIDColumn.InternalName))
' instantiate the object that will communicate with a web service
Dim webService As New ShippersTableWebServices
' call the web service's "GetRecord"
webService.DeleteShippersRecord(shipperId)
Catch e As Exception
Throw e
End Try
End Sub
' override the CreateRecord which will call a stored-procedure, or create in-line SQL.
' instead, call a web service to Create a Shippers record
Public Overloads Overrides Function CreateRecord() As IronSpeed.Base.Data.KeyValue
Try
' establish which data access class to use
Dim tableDataAccess As ShippersAccess = ShippersRecord.TableUtils
' obtain the field values from the local record object (which is not yet created in the database)
Dim companyName As String =
CStr(columnValues(GetColumnIndexByName(tableDataAccess.CompanyNameColumn.InternalName)))
Dim phoneNumber As String =
CStr(columnValues(GetColumnIndexByName(tableDataAccess.PhoneColumn.InternalName)))
' instantiate the object that will communicate with a web service
Dim webService As New ShippersTableWebServices
' call the web service's "CreateRecord"
Dim shipperId As Integer = webService.AddShippersRecord(companyName, phoneNumber)
z Page 676
z Page 677
Properties Files....................................................................................................................................... 6
Copying Properties Files .......................................................................................................................................6
Handling Errors in Properties Files .......................................................................................................................7
Basic XML Syntax and Vocabulary.......................................................................................................................8
Prologue ................................................................................................................................................................9
XML Declaration Element ................................................................................................................................9
ComponentDefinition Element ............................................................................................................................10
Self Element........................................................................................................................................................12
ComposedOf Element.........................................................................................................................................13
EventBindings Element .......................................................................................................................................14
Event Element.....................................................................................................................................................15
ContainedComponent Element...........................................................................................................................15
Button Element ..............................................................................................................................................20
CategoryFilter Element ..................................................................................................................................21
FieldFilter Element .........................................................................................................................................23
FieldSort Element ..........................................................................................................................................24
FieldStatistic Element ....................................................................................................................................25
FieldValue Element........................................................................................................................................26
Footer Element ..............................................................................................................................................37
Header Element .............................................................................................................................................38
Html Element .................................................................................................................................................38
HyperLink Element.........................................................................................................................................39
Image Element...............................................................................................................................................39
ImageButton Element ....................................................................................................................................40
LinkButton Element........................................................................................................................................41
Label Element ................................................................................................................................................43
Literal Element ...............................................................................................................................................43
Menu Element................................................................................................................................................44
Pagination Element........................................................................................................................................44
PagingControl Element ..................................................................................................................................45
PushButton Element ......................................................................................................................................45
Record Element .............................................................................................................................................47
SearchFilter Element .....................................................................................................................................48
Selection Element ..........................................................................................................................................49
Table Element................................................................................................................................................49
TableStatistic Element ...................................................................................................................................50
Text Element..................................................................................................................................................51
UserControl Element......................................................................................................................................51
678
z Page 679
Properties files
The following illustration shows a source HTML layout page file (web page) containing several code generation tags.
Each code generation tag represents one databound control that will eventually be generated. Using Iron Speed
z Page 680
Designer, the database bindings for each control (code generation tag) is collected and saved in a properties file. The
web pages, properties files and table binding files are used to build the fully working 3-tier application.
HTML layout pages drive the
application generation process
in Iron Speed Designer.
Simple code generation tags
specify the databound controls
to be generated. After binding
controls to database tables
and fields, a fully functional 3tier application is generated.
The HTML in this example
includes code generation tags
for fields and labels in the
"Ship-to-Customer" table.
When your application is built,
Iron Speed Designer replaces
the code generation tags with
ASPX code and binds the
pages to the database using
information in the associated
properties files.
Dont worry if this sounds a bit complicated. Unless youre doing advanced work with Iron Speed Designer, youll
never have to work directly with table binding files and properties files; all of the respective configuration and property
setting is done directly through Iron Speed Designers easy-to-use user interface.
Properties Files
Properties files specify the various options for the controls in the layout page files, including database table and field
binding properties. For example, the properties file contains information about which data table is the source of the
data in the record being displayed. Similarly, the properties file also contains information about the control, such as
the list of other controls that need to be informed when this control is changed.
z Page 681
The Iron Speed Designer Properties dialog saves this information in a set of properties files. Alternatively, you can
create and modify the properties files yourself, giving you the maximum flexibility in generating your application. Either
way, the properties files, plus the table binding files, contain all of the information necessary to build the underlying
SQL queries and application source code.
<ContainedComponent>
<Name>ProductName</Name>
<Type>FieldValue</Type>
<Field>LastName</Field>
<FieldValueStyle>Literal</FieldValueStyle>
<Editable>false</Editable>
<Table>Employees</Table>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>URL</Value>
</Attribute>
<Attribute>
<Name>InternalUse:DataSourceArg</Name>
<Value>Emp</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Once the appropriate database and display information has been set for each component via the properties files, the
actual application generation process begins. The fully expanded layout pages, the properties files, and the table
binding files are used by Iron Speed Designer to create the actual ASPX, ASCX and source code (Visual Basic) files.
More detail is provided about the Code generation tags, page templates and properties files later in this Guide.
Hierarchy in Properties Files
Properties files provide the ability to override the properties of an included component. This concept of overriding is
based on the concept of object oriented programming and inheritance. For example, the Menu component specifies a
normal, un-highlighted view of all menu items within the menu. When the application user clicks on the Customer
menu item, the page displayed for example, the page containing a list of customers must show the Customer menu
to be selected. As such, the properties file for the Customer Show Table page overrides the visible state of the
Customer menu item to be hidden and overrides the visible state of the Customer highlighted menu item to be visible.
This provides the visual feedback to the application user to indicate that the Customer page is being displayed.
The properties can be overwritten at the next higher levels of inclusion. For example, the Page level is the can
override the properties of any of the components included in the page such as the menu. However, the page cannot
override components two or more levels deep.
z Page 682
PROPERTIES FILES
The properties files specify the various options for the controls in the HTML layout page files. The properties files save
the settings you specify in the Properties dialog in Iron Speed Designer. The Properties Files are used in combination
with the HTML layout page files to produce the ASPX pages, ASCX controls and the code-behind files. There is a
one-to-one correspondence between the components contained in the properties files and the code generation tags
you specified in the HTML layout page file.
The properties file contains information about which data table is the source of the data and also contains information
about each control, such as the list of other controls that need to be informed by the event handler when the control is
changed.
This chapter describes the component definition schema used by Iron Speed Designer. In general you do not need to
make any changes to this file directly by hand. All of the changes to this file can be made through the Properties
dialog. If you do need to make changes to this file, we recommend making a backup copy of the file prior to making
changes.
In general the name of the component type used in the properties file corresponds directly to the names of the code
generation tag. For example, a GEN:FieldValue code generation tag when bound results in a component whose type
is FieldValue. However, this is not always the case. For example, if a GEN:FieldLabel code generation tag is set to a
HyperLink style to sort a table, a FieldSort component type is created. However, the same GEN:FieldLabel code
generation tag can be set to a Label style to just display a column label without any sorting capability. In this case, the
GEN:FieldLabel code generation tag results in a Label component type in the properties file.
This section contains information about:
Self Element
ComposedOf Element
EventBindings Element
Prologue
Event Element
ComponentDefinition Element
ContainedComponent Element
z Page 683
If you would like to make a copy of the files to create a new page or panel, you must not only copy the two files as a
pair, but must also change the reference to the layout page file in the properties file. Otherwise, the copied properties
file will still point to the original layout page file and your results might not be the same as you desired.
Properties dialog: The Properties dialog may display an error when it finds mismatches between the type of
tag between the layout page file and the properties file. This error may be displayed when you first select the
code generation tag that is problematic or might occur when the Save button is pressed and the complete
validation of the tags is performed.
Generation: During generation, if Iron Speed Designer finds any mismatches between the type of the code
generation tag and its properties, it will report errors. These errors may be reported either at code generation
time or at compile time. The generated code is compiled as the final step of application generation.
Run Time: Some errors cannot be detected at development or application generation time. In this case, these
errors are reported at run time. Typically these errors result in a Yellow Screen of error reported by the
Internet Information Server.
Review Pass-through Attribute Settings: The Properties dialog contains a Properties tab that shows passthrough attributes for the code generation tag. Occasionally, some of the pass-through attributes may not be
deleted when the type of code generation tag is changed. You can review the specific code generation tags
and delete the ones that do not belong to the current type of the tag. If in doubt, you can delete all of the
current attributes, switch to the Basic tab and switch back to the Properties tab. When you switch to the Basic
tab, Iron Speed Designer Properties dialog automatically determines the missing pass-through attributes for
the current code generation tag and re-creates them if they are not present.
Edit Properties File: You can also use a text editor such as Notepad to edit the properties file and remove the
specific component or element that might be creating a problem. You must be familiar with the XML language
and the syntax of the properties files to use this approach.
Delete Properties File: As a last resort, perhaps the safest and best approach is to delete the properties file
using Windows Explorer and then reset all of the component properties again. While this may require
additional work on your part, this has the advantage of ensuring that the everything contained in the properties
file accurately reflects the code generation tags contained in the layout page file.
z Page 684
z Page 685
Note: XML is case sensitive. As such, all tags must be specified exactly in the same case. For example, the Subject
tag is not the same as subject. Similarly, the values within the tag are also case sensitive. For example, True is not
the same as true.
Note: All attribute values are enclosed in quotes even if they are numeric or contain just a single word. For example,
to specify the value for Age, specify
<Person Age=25 />
Prologue
Every Properties File starts with a prologue section that indicates the type of the file and some basic information used
by the XML parser to understand the format of the file.
For more detail, see:
The XML declaration at the beginning of each properties file created by Iron Speed Designer is shown below:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
The encoding of the properties file has no relationship with the encoding of an HTML layout page. We recommend
you do not change the XML declaration of a properties file.
Rules:
If the XML declaration is included, it must be situated at the first position of the first line in the XML document.
If the XML declaration is included, it must contain the version number attribute.
If all of the attributes are declared in an XML declaration, they must be placed in the order shown above.
If any elements, attributes, or entities are used in the XML document that are referenced or defined in an
external DTD, standalone="no" must be included.
z Page 686
The XML declaration must be in lower case (except for the encoding declarations).
Note:
The following table shows a list of the possible attributes that may be used in the XML declaration.
Attribute
Description
version
Specifies the version of the XML standard that the XML document conforms to. The
version attribute must be included if the XML declaration is declared.
Possible values: 1.0.
encoding
These are the encoding names of the most common character sets in use today.
Possible values: UTF-8, UTF-16, ISO-10646-UCS-2, ISO-10646-UCS-4, ISO-8859-1 to
ISO-8859-9, ISO-2022-JP, Shift_JIS, EUC-JP
standalone
Use 'yes' if the XML document has an internal DTD. Use 'no' if the XML document is linked
to an external DTD, or any external entity references.
Possible values: yes, no.
Additional information about the prologue section is available on the following websites:
http://xmlwriter.net/xml_guide/xml_declaration.shtml
http://xmlwriter.net/xml_guide/glossary.shtml#EncodingNames
http://www.iana.org/assignments/character-sets
ComponentDefinition Element
The ComponentDefinition is the root element in the Iron Speed Designer properties files. All other tags are subelements of this tag. This tag has a few attributes and a number of sub-elements. Some of the sub-elements are
complex elements while others are simple elements.
The complex elements are described in detail in their own sections.
Sample
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ComponentDefinition xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.ironspeed.com/designer">
<Generator>Iron Speed Designer</Generator>
z Page 687
<Version>1.4</Version>
<Self>
</Self>
<ComposedOf>
<ContainedComponent>
</ContainedComponent>
</ComposedOf>
</ComponentDefinition>
Attributes
The XMLDefinition element contains the following attributes:
Attribute
Description
xmlns:xsd
xmlns:xsd is the standard namespace declaration for the W3C XML namespace
specification.
xmlns:xsi
xmlns:xsi is the standard namespace declaration for the W3C XML namespace
specification.
xmlns
This is the default namespace used in properties file XML documents and is the schema
for properties file XML. The value of this could be any URL. However, it is customary that
the value be put as a functional URL from where the XML schema could be downloaded.
Elements
Element
Type
Description
Generator
Simple
Version
Simple
1.3
1.4
Version 1.4 files are not compatible with earlier versions of the properties
files.
z Page 688
Element
Type
Description
Self
Complex
ComposedOf
Complex
Self Element
Self is a complex sub-element of the ComponentDefinition element. For every properties file, there will be one Self
element.
The properties file corresponds to a layout page file specified by the developer and can correspond to a Page or a
Panel. If the Type is Page, an ASPX page is generated and if the Type is something other than a Page, an ASCX
control is generated.
Attributes
None.
Elements
Element
Type
Description
Name
Simple
The name of the page or panel. This is typically the root name of the file.
For example, for the ShowOrdersRecord.html layout page file, the name
would be ShowOrdersRecord.
Type
Simple
Specifies the type of the properties file. If the Type is Page, an ASPX
page is produced. If the type is anything other than a page, an ASCX
control is produced.
GenerateDirectory
Simple
The name of the generation directory relative to the root path of the
application. If you use a fully specified directory path, you will not be able
to copy the application and run it from a different location.
Layout
Simple
Specifies the location and name of the layout page file. Includes a
directory relative to the root directory of the application. If you use a fully
specified directory path, you will not be able to copy the application and
run it from a different location.
DisplayName
Simple
The display name is used as the Title of the page that is displayed in the
browsers title area.
z Page 689
Element
Type
Description
Description
Simple
Any text description of the page. This is not used by the application
generation engine. It only exists to give you an ability to provide more
detailed information about the page or the panel.
ReadOnly
Simple
A Boolean flag to indicate whether the ASPX file or ASCX controls should
be generated or not. If set to True, application generation engine skips the
generation of the files for this combination of properties file and the HTML
layout page file.
The absence of this element implies a False value so the application
generation engine will generate code for this properties file.
CustomCodePath
Simple
The name of a file including the directory to include at the end when
generating your application. Using this element, you can easily extend the
behavior of the application generation engine very easily.
LoginRequired
Simple
A semicolon separated list of roles that are permitted to access this page.
If the application user is not logged in, the user is sent to a login page and
must log in before they may access the page.
EventBindings
Complex
Sample
<Self>
<Name>TableDisplay</Name>
<Type>Page</Type>
<GenerateDirectory>Tutorial Pages</GenerateDirectory>
<Layout>Source\TUTORIAL PAGES\TableDisplay.html</Layout>
<DisplayName>TableDisplay</DisplayName>
<Description>(Description)</Description>
</Self>
ComposedOf Element
ComposedOf is a complex sub-element of the ComposedDefinition element. In every properties file, there may be a
maximum of one ComposedOf element.
The ComposedOf complex sub-element can contain zero or more ContainedComponent as described later in this
document. Each ContainedComponent corresponds to a specific code generation tag in the layout page file.
z Page 690
Attributes
None.
Elements
Element
Type
Description
ContainedComponent
Complex
There is one contained component element for each code generation tag
specified in the HTML layout page file.
EventBindings Element
EventBindings is a complex sub-element of the Self element and the ComposedOf element (described later in this
document). There can be zero or more EventBindings specified for either of the other elements.
A component can interact indirectly with other components by using the page to broadcast messages called events.
The component initiating the broadcast is called the event producer. Components that are interested in these
messages can register themselves with the event dispatcher (i.e. the page) as event consumers. When an event
producer wishes to broadcast an event, it creates an event object that contains data about the event and the events
producer, and sends it to the event dispatcher. Then the event dispatcher passes the event object to all consumers of
that type of event so that they can respond to (or ignore) the event however they want.
You specify the EventBindings in the Properties dialog. The Application Builder may also automatically create them.
Each EventBindings complex element contains zero or more Event complex elements described later in this
document.
Attributes
None.
Elements
Element
Type
Description
Event
Complex
Sample
<EventBindings>
<Event>
<Producer>Search</Producer>
<Consumer>SearchTextBox</Consumer>
</Event>
z Page 691
</EventBindings>
Event Element
Event is a complex sub-element of the EventBindings element. There can be zero or more Event elements in the
EventBindings element.
Attributes
None.
Elements
Element
Type
Description
Producer
Simple
The name of the producer of the event. This name is the name of the code
generation tag you specified in the Name attribute in the HTML layout page file.
The name must not contain any spaces or special characters.
Consumer
Simple
The name of the consumer of the event. This name is the name of the code
generation tag you specified in the Name attribute in the HTML layout page file.
The name must not contain any spaces or special characters.
Sample
<Event>
<Producer>Search</Producer>
<Consumer>SearchTextBox</Consumer>
</Event>
ContainedComponent Element
ContainedComponent is a complex sub-element of the ComposedOf element. There can be zero or more Contained
Component elements in the ComposedOf element. There is a one-to-one correspondence between the code
generation tags in the HTML layout page file and the Contained Components.
Since not all Contained Components may be bound, there may be fewer Contained Components in the properties file
than the number of code generation tags. If you renamed or deleted some code generation tags from the HTML layout
page file, you might see some unused Contained Components in this file. These are ignored by Iron Speed Designer
and should not cause any harm.
The ContainedComponent element contains a number of sub-elements as shown below. Some elements are only
applicable to certain types of components.
A sample ContainedComponent complex element is shown below.
z Page 692
<ComposedOf>
<ContainedComponent>
</ContainedComponent>
</ComposedOf>
Attributes
None.
Elements
Element
Type
Description
Name
Simple
The name of the component. This name is the name of the code
generation tag you specified in the Name attribute in the HTML layout
page file. The name must not contain any spaces or special characters.
Type
Simple
Html
HyperLink
Image
ImageButton
LinkButton
Literal
Menu
Page
Pagination
PagingControl
PushButton
RangeFilter
Record
Search
SearchFilter
Selection
SubCategoryFilter
Table
TableStatistic
Text
Unspecified
UserControl
Field
Simple
The name of the field of a table. In combination with the Table, this
element specifies the field and table for a FieldValue component. This
component is also used by other components such as FieldLabel.
Table
Simple
The name of the database table. In combination with the Field, this
element specifies the field and table for a FieldValue component. This
component is also used by other components such as FieldLabel.
z Page 693
Element
Type
Description
AutoGenerateItems
Simple
ControlName
Simple
Description
Simple
DisplayStyle
Simple
Editable
Simple
EventBindings
Complex
A complex element specifying the event bindings for this control. This
control can be the consumer or the producer of events. This complex
element is defined elsewhere in this document.
FieldValueStyle
Simple
FieldStatisticType
Simple
RadioButtonList
TextBox
Literal
Image
FileUpload
ImageButton
LinkButton
PushButton
ListBox
z Page 694
Element
Type
Description
FieldStatisticScope
Simple
This element specifies the scope of the field statistic code generation tag.
The possible values are: CurrentPage or AllPages
ImageUrl
Simple
Layout
Simple
This element specifies the name of the layout page file. This is used for
any of the component types that utilize a panel such as a Button.
The value of this element is a relative directory and file name of the HTML
layout page file for the panel.
MaxItems
Simple
NullValueText
Simple
The value to display when a NULL value is read from the database for the
given field. This is typically defaulted to to indicate a hard space.
PaginationType
Simple
z Page 695
Element
Type
Description
PassthroughAttributes
Complex
QueryDefinition
Complex
This element is used to specify a query definition used by the filter criteria
that is specified for any table or field.
RecordSource
Simple
Used by the Record and FieldValue code generation tags to indicate the
source of the record.
SpecifiedItems
Complex
This element specifies the explicit list of items used by the drop down list
or radio button list. This is typically used when AutoGenerateItems is set
to false and the items to display are specified by you.
UrlKey
Simple
Width
Simple
The width of the control. This is typically used when a textbox is specified
as the style for a FieldValue component.
The following sections describe in detail the specific elements that are used by each of the various component types
used by Iron Speed Designer.
For more detail, see:
Button Element
HyperLink Element
PushButton Element
CategoryFilter Element
Image Element
Record Element
FieldFilter Element
ImageButton Element
SearchFilter Element
z Page 696
FieldSort Element
LinkButton Element
Selection Element
FieldStatistic Element
Label Element
Table Element
FieldValue Element
Literal Element
TableStatistic Element
Footer Element
Menu Element
Text Element
Header Element
Pagination Element
UserControl Element
Html Element
PagingControl Element
Button Element
A button component creates a reusable panel and is based on a layout that you can specify. The PushButton,
LinkButton and ImageButton are standard HTML buttons.
In addition to the Name, Type and Layout elements, the Button uses a number of pass-through attributes to set the
values of attributes inside of the Button panel.
The attributes whose names have a prefix of P_Button- refer to the attributes within the Button panel. This is based on
a convention that if there is a code generation tag named Button within the Button-Everest.html panel, it is referred to
by the name P_Button by the enclosing page or panel. As such, the P_Button-CausesValidation pass through
attribute refers to the CausesValidation attribute of the code generation tag named Button within the ButtonEverest.html panel in the example shown below.
Pass-through attributes
Pass-through attributes that are passed to the underlying control are prefixed with P- followed by the name of the
control.
Pass-through
attributes
Description
CausesValidation
A Boolean value indicating whether the button causes validation or not. If True, the button
will try to validate the data entered on the page. If False, no validation is performed.
False is typically used as a value for the Cancel buttons while True is used for OK or Save
buttons.
CommandName
The name of the command. Command names for buttons are specified elsewhere in this
document.
z Page 697
Pass-through
attributes
Description
RedirectURL
The URL for the button. It can be any valid URL or the special keyword Back to take the
application user back to the previous page.
Button-Text
Sample
<ContainedComponent>
<Name>CancelButton</Name>
<Type>Button</Type>
<Layout>..\OtherComponents\Button-Everest.html</Layout>
<PassthroughAttributes>
<Attribute>
<Name>P_Button-CausesValidation</Name>
<Value>False</Value>
</Attribute>
<Attribute>
<Name>P_Button-CommandName</Name>
<Value>ResetData</Value>
</Attribute>
<Attribute>
<Name>P_Button-RedirectURL</Name>
<Value>Back</Value>
</Attribute>
<Attribute>
<Name>P_Button-Text</Name>
<Value>Cancel</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
CategoryFilter Element
The CategoryFilter component can be used to filter the resulting records displayed in a table by placing a hierarchical
navigation path on a page and allowing the user to navigate up or down the category path. For example, the result of
a CategoryFilter tag might look like:
All > Sony > VCRs Heads: 4-Heads
The CategoryFilter tag displays a label on the left or the line corresponding to the field being selected. For example,
the Manufacturer is the label shown to the left of the current category.
z Page 698
Description
Fields
InternalUse:Table
V_CategoryFilterPathContainer:CssClass
V_CategoryFilterSubcategoryContainer:CssClass
Sample
<ContainedComponent>
<Name>CategoryFilter</Name>
<Type>CategoryFilter</Type>
<PassthroughAttributes>
<Attribute>
<Name>Fields</Name>
<Value>SupplierID,CategoryID</Value>
</Attribute>
<Attribute>
<Name>InternalUse:Table</Name>
<Value>Products</Value>
</Attribute>
<Attribute>
<Name>V_CategoryFilterPathContainer:CssClass</Name>
<Value>category</Value>
</Attribute>
<Attribute>
<Name>V_CategoryFilterSubcategoryContainer:CssClass</Name>
<Value>subcategory</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
z Page 699
FieldFilter Element
The FieldFilter component is used to display various types of field filters including dropdown lists and text boxes. The
FieldValueStyle element and the Operator pass through attribute specifies the type of filter to use. Note that you can
create very advanced filtering controls by combining a variety of
Pass-through attributes
Pass-through attributes
Description
FIeldValueStyle
InternalUse:Table
Operator
V_ContactNameFieldFilterDropDownList:CssClass
CssClass
V_OrderDateFilterEndTextBox:Columns
z Page 700
</Attribute>
<Attribute>
<Name>V_ContactNameFieldFilterDropDownList:CssClass</Name>
<Value>Filter_Input</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Sample
<ContainedComponent>
<Name>OrderDateFilterStart</Name>
<Type>FieldFilter</Type>
<FieldValueStyle>TextBox</FieldValueStyle>
<PassthroughAttributes>
<Attribute>
<Name>CssClass</Name>
<Value>field_Label</Value>
</Attribute>
<Attribute>
<Name>Field</Name>
<Value>OrderDate</Value>
</Attribute>
<Attribute>
<Name>InternalUse:Table</Name>
<Value>Orders</Value>
</Attribute>
<Attribute>
<Name>Operator</Name>
<Value>>=</Value>
</Attribute>
<Attribute>
<Name>V_OrderDateFilterEndTextBox:Columns</Name>
<Value>18</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
FieldSort Element
The FieldSort component is used by the column headings in a table view. If you use a FieldLabel code generation tag
and select a Hyperlink as the type of label, a FieldSort component is created. An event linking the FieldSort with the
table must also be specified in the Properties dialog.
A Label component is generated when the column heading is specified as a label instead of a hyperlink.
z Page 701
Pass-through attributes
Pass-through
attributes
Description
Field
The name of the field on which sorting should occur. Note that you can sort on any field you
like even one that is not displayed within the table.
Table
Text
The label to display within the hyperlink. You can either specify a text string directly or you
can specify a variable of the form %ISD_DEFAULT%Products%ProductName. This variable
specifies that the text label is the default label specified in the Databases folder of the Iron
Speed Designer for the ProductName field in the Products table.
Sample
<ContainedComponent>
<Name>ProductNameFieldLabel</Name>
<Type>FieldSort</Type>
<PassthroughAttributes>
<Attribute>
<Name>Field</Name>
<Value>ProductName</Value>
</Attribute>
<Attribute>
<Name>Table</Name>
<Value>Products</Value>
</Attribute>
<Attribute>
<Name>Text</Name>
<Value>%ISD_DEFAULT%Products%ProductName</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
FieldStatistic Element
The FieldStatistic code generation tag is used to specify page and grand totals within a GEN:Table code generation
tag. If you would like to get totals outside of a GEN:Table tag, use the GEN:TableStatistic code generation tag that
generates a TableStatistic component.
z Page 702
Pass-through attributes
Pass-through
attributes
Description
Field
The name of the field on which sorting should occur. Note that you can sort on any field
you like even one that is not displayed within the table.
FieldStatisticType
The type of statistic to display. Count is used to display the number of records in the
table or returned by the query. Sum allows you to add the total amount based on a field
and display the total.
FieldStatisticScope
Sample
<ContainedComponent>
<Name>GrandTotal</Name>
<Type>FieldStatistic</Type>
<FieldStatisticType>Sum</FieldStatisticType>
<FieldStatisticScope>AllPages</FieldStatisticScope>
<PassthroughAttributes>
<Attribute>
<Name>Field</Name>
<Value>Subtotal</Value>
</Attribute>
<Attribute>
<Name>Table</Name>
<Value>Order Subtotals</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
FieldValue Element
The FieldValue component is one of the most important components generated by Iron Speed Designer. This
component will in turn create an ASPX control to retrieve and display data from a database field. When the ASPX
control is generated, the FieldValue component is smart enough to generate a Record ASPX control if the FieldValue
component is not inside of a Record control already.
The FieldValue component contains a basic set of elements for the default Literal style. Additional pass-through
attributes are added for other styles of the Field Value component as shown later.
The pass-through attributes common on all field values are shown below. They are not listed for each field style.
z Page 703
Pass-through attributes
Pass-through attributes
Description
InternalUse:DataSource
The source of the data for this field value. If the field value is enclosed in a
table or a record, the source is typically the parent. If you specified a different
table or query, the DataSource will reflect your selection.
CheckBox
The CheckBox style displays the field value as a check box. This is typically used for Boolean fields that have only two
values.
Pass-through attributes
None in addition to the pass-through attributes that are common across all FieldValue components.
Sample
<ContainedComponent>
<Name>Discontinued</Name>
<Type>FieldValue</Type>
<Field>Discontinued</Field>
<FieldValueStyle>CheckBox</FieldValueStyle>
<Editable>false</Editable>
<Table>Products</Table>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
DropDownList
Displays the values from the database in a dropdown list. The values displayed are the current values across all
records in the database table for the selected field.
Pass-through attributes
None in addition to the pass-through attributes that are common across all FieldValue components.
Sample
<ContainedComponent>
<Name>Discontinued</Name>
<Type>FieldValue</Type>
z Page 704
<Field>Discontinued</Field>
<FieldValueStyle>DropDownList</FieldValueStyle>
<Editable>false</Editable>
<Table>Products</Table>
<AutoGenerateItems>true</AutoGenerateItems>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
FileUpload
Displays a file upload control including a browse button to upload a binary or text file contents into the field.
Pass-through attributes
None in addition to the pass-through attributes that are common across all FieldValue components.
Sample
<ContainedComponent>
<Name>Picture</Name>
<Type>FieldValue</Type>
<Field>Picture</Field>
<FieldValueStyle>FileUpload</FieldValueStyle>
<Editable>false</Editable>
<Table>Categories</Table>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Image
Displays an image from the database.
z Page 705
Pass-through attributes
Pass-through
attributes
Description
ImageUrlFormat
Since the image is in a binary field in the database and not on the file system, this
element specifies the ASPX code to use to format and display the image data
retrieved from the database.
Sample
<ContainedComponent>
<Name>Photo</Name>
<Type>FieldValue</Type>
<Field>Photo</Field>
<FieldValueStyle>Image</FieldValueStyle>
<Editable>false</Editable>
<Table>Employees</Table>
<PassthroughAttributes>
<Attribute>
<Name>ImageUrlFormat</Name>
<Value>..\ExportFieldValue.aspx?Table=Employees&Field=Photo&Record={0}&Offset=78</Value>
</Attribute>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
ImageButton
Displays an image from the database and changes it into a button that can be clicked by the user to take an action.
Specifies both the image field from the database and the button properties.
Pass-through attributes
Pass-through
attributes
Description
CausesValidation
A Boolean value indicating whether the button causes validation or not. If True, the
button will try to validate the data entered on the page. If False, no validation is
performed. False is typically used as a value for the Cancel buttons while True is
used for OK or Save buttons.
z Page 706
Pass-through
attributes
Description
CommandName
The name of the command. Command names for buttons are specified elsewhere in
this document.
Consumers
The consumer of the event when the image is clicked. Typically the value of this tag
is parent:record, indicating that the parent record must receive the event.
RedirectURL
The URL for the button. It can be any valid URL or the special keyword Back to take
the application user back to the previous page.
RedirectArgument
Indicates whether any argument is to be passed on the URL and how to specify the
URL value.
ToolTip
The tool tip to display when the application user hovers over the tip.
Sample
<ContainedComponent>
<Name>Photo</Name>
<Type>FieldValue</Type>
<Field>Photo</Field>
<FieldValueStyle>ImageButton</FieldValueStyle>
<Editable>false</Editable>
<Table>Employees</Table>
<PassthroughAttributes>
<Attribute>
<Name>CausesValidation</Name>
<Value>False</Value>
</Attribute>
<Attribute>
<Name>CommandName</Name>
<Value />
</Attribute>
<Attribute>
<Name>Consumers</Name>
<Value>None</Value>
</Attribute>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
<Attribute>
<Name>RedirectURL</Name>
z Page 707
<Value />
</Attribute>
<Attribute>
<Name>Tooltip</Name>
<Value>Employee Photo</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Label
Displays a field value as a label. The label component can be accessed through the Visual Basic code-behind to
modify it programmatically if necessary.
Pass-through attributes
None in addition to the pass-through attributes that are common across all FieldValue components.
Sample
<ContainedComponent>
<Name>CategoryName</Name>
<Type>FieldValue</Type>
<Field>CategoryName</Field>
<FieldValueStyle>Label</FieldValueStyle>
<Editable>false</Editable>
<Table>Categories</Table>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
LinkButton
The link button displays the field value as a link that can be clicked by the application user. This component specifies
the additional attributes for the action to take when the link is clicked.
z Page 708
Pass-through attributes
Pass-through
attributes
Description
CausesValidation
A Boolean value indicating whether the button causes validation or not. If True, the
button will try to validate the data entered on the page. If False, no validation is
performed. False is typically used as a value for the Cancel buttons while True is
used for OK or Save buttons.
CommandName
The name of the command. Command names for buttons are specified elsewhere in
this document.
Consumers
The consumer of the event when the image is clicked. Typically the value of this tag
is parent:record indicating that the parent record must receive the event.
RedirectURL
The URL for the button. It can be any valid URL or the special keyword Back to take
the application user back to the previous page.
RedirectArgument
Indicates whether any argument is to be passed on the URL and how to specify the
URL value.
ToolTip
The tool tip to display when the application user hovers over the tip.
Sample
<ContainedComponent>
<Name>ReportsTo</Name>
<Type>FieldValue</Type>
<Field>ReportsTo</Field>
<FieldValueStyle>LinkButton</FieldValueStyle>
<Editable>false</Editable>
<Table>Employees</Table>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
<Attribute>
<Name>TextFormat</Name>
<Value>Employee ID: {0}</Value>
</Attribute>
<Attribute>
<Name>Consumers</Name>
<Value>parent:record</Value>
z Page 709
</Attribute>
<Attribute>
<Name>RedirectUrl</Name>
<Value>./EmployeeFKLink.aspx?Employee={0}</Value>
</Attribute>
<Attribute>
<Name>RedirectArgument</Name>
<Value>FK:FK_Employees_Employees</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
ListBox
Displays the values as a list box. All of the current values used in the table are displayed in the list box. If the number
of items is more than a hundred, only the first hundred are used. You can use a Large List Selector to display more
than a hundred values.
Pass-through attributes
None in addition to the pass-through attributes that are common across all FieldValue components.
Sample
<ContainedComponent>
<Name>FVLabel1</Name>
<Type>FieldValue</Type>
<Field>Region</Field>
<FieldValueStyle>ListBox</FieldValueStyle>
<Editable>false</Editable>
<Table>Employees</Table>
<AutoGenerateItems>true</AutoGenerateItems>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Literal
Displays the field value as a literal .NET control. The literal control does not add any additional Css styles or any other
formatting to the display.
z Page 710
Pass-through attributes
Pass-through
attributes
Description
TextFormat
The TextFormat allows you to embed the field value within other HTML tags. To
refer to the field value, use the variable {0} in the HTML text specified. In the
example below, the field value contains a URL for an image. The TextFormat
encloses this URL in an IMG HTML tag to display the image referenced by the URL.
Sample
<ContainedComponent>
<Name>Picture</Name>
<Type>FieldValue</Type>
<Field>Image</Field>
<FieldValueStyle>Literal</FieldValueStyle>
<Editable>false</Editable>
<Table>Applications</Table>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
<Attribute>
<Name>TextFormat</Name>
<Value><img src="{0}" width="50"></Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
PushButton
Pass-through attributes
Pass-through
attributes
Description
CausesValidation
A Boolean value indicating whether the button causes validation or not. If True, the
button will try to validate the data entered on the page. If False, no validation is
performed. False is typically used as a value for the Cancel buttons while True is
used for OK or Save buttons.
CommandName
The name of the command. Command names for buttons are specified elsewhere in
this document.
z Page 711
Pass-through
attributes
Description
Consumers
The consumer of the event when the image is clicked. Typically the value of this tag
is parent:record indicating that the parent record must receive the event.
RedirectURL
The URL for the button. It can be any valid URL or the special keyword Back to take
the application user back to the previous page.
RedirectArgument
Indicates whether any argument is to be passed on the URL and how to specify the
URL value.
ToolTip
The tool tip to display when the application user hovers over the tip.
Sample
<ContainedComponent>
<Name>FVPushButton1</Name>
<Type>FieldValue</Type>
<Field>Photo</Field>
<FieldValueStyle>PushButton</FieldValueStyle>
<Editable>false</Editable>
<Table>Employees</Table>
<PassthroughAttributes>
<Attribute>
<Name>CausesValidation</Name>
<Value>False</Value>
</Attribute>
<Attribute>
<Name>CommandName</Name>
<Value>AddRecord</Value>
</Attribute>
<Attribute>
<Name>Consumers</Name>
<Value>None</Value>
</Attribute>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
z Page 712
RadioButtonList
Creates the field value as a series of radio buttons within a group. The list of values can be either retrieved from the
database or provided on the Properties dialog.
Pass-through attributes
Pass-through
attributes
Description
SpecifiedItems
Contains a complex element to specify the list of radio buttons to display in a NameValue pair format as shown below.
Sample
<ContainedComponent>
<Name>Discontinued</Name>
<Type>FieldValue</Type>
<Field>Discontinued</Field>
<FieldValueStyle>RadioButtonList</FieldValueStyle>
<Editable>false</Editable>
<Table>Products</Table>
<AutoGenerateItems>false</AutoGenerateItems>
<SpecifiedItems>
<Item>
<Name>No</Name>
<Value>No</Value>
</Item>
<Item>
<Name>Yes</Name>
<Value>Yes</Value>
</Item>
</SpecifiedItems>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
<Attribute>
<Name>RepeatLayout</Name>
<Value>Flow</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
z Page 713
TextBox
Displays the value in a text box. If the text box is not marked as Editable, then changes to the values in the text box
will not be saved.
Pass-through attributes
Pass-through
attributes
Description
CssClass
The name of the CssClass to use for the text box control.
Sample
<ContainedComponent>
<Name>Address</Name>
<Type>FieldValue</Type>
<Field>Address</Field>
<FieldValueStyle>TextBox</FieldValueStyle>
<Editable>false</Editable>
<Table>Applications</Table>
<PassthroughAttributes>
<Attribute>
<Name>CssClass</Name>
<Value>field_input</Value>
</Attribute>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>Parent</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Footer Element
The Footer component refers to a reusable panel specified by the Layout element. There are no pass-through
attributes passed to the footer panel in the default properties.
Pass-through attributes
None
Sample
<ContainedComponent>
<Name>Footer</Name>
<Type>Footer</Type>
z Page 714
<Layout>..\OtherComponents\Footer-Everest.html</Layout>
</ContainedComponent>
Header Element
The Header component refers to a reusable panel specified by the Layout element. There are no pass-through
attributes passed to the footer panel in the default properties.
Pass-through attributes
None
Sample
<ContainedComponent>
<Name>Header</Name>
<Type>Header</Type>
<Layout>Source\TUTORIAL PAGES\HeaderPanel.html</Layout>
</ContainedComponent>
Html Element
The HTML tag allows you to specify any HTML text to be placed on the page or the panel. This component provides
you the ability to customize a layout page by adding HTML code without having to edit the underlying layout.
Pass-through attributes
Pass-through
attributes
Description
Text
Specifies the HTML text to embed into the layout page. There are no restrictions on
the HTML that can be used as long as it works with the enclosing page.
Sample
<ContainedComponent>
<Name>HtmlTag</Name>
<Type>Html</Type>
<PassthroughAttributes>
<Attribute>
<Name>Text</Name>
<Value><p>this is html</p></Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
z Page 715
HyperLink Element
The Hyperlink component specifies a hyperlink on the page with a redirect URL and a target window for the browser to
use.
Pass-through attributes
Pass-through
attributes
Description
NavigateURL
Target
The target browser window to use when opening the link. Any valid target value can
be specified here.
Sample
<ContainedComponent>
<Name>HyperLink1</Name>
<Type>HyperLink</Type>
<PassthroughAttributes>
<Attribute>
<Name>NavigateURL</Name>
<Value>http://www.ironspeed.com</Value>
</Attribute>
<Attribute>
<Name>Target</Name>
<Value>_blank</Value>
</Attribute>
<Attribute>
<Name>Text</Name>
<Value>HyperLink1</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Image Element
Any image to display. The URL of the image is specified in the Properties dialog. This URL must be an image file
recognized by the browser.
Pass-through attributes
None
z Page 716
Sample
<ContainedComponent>
<Name>Image1</Name>
<Type>Image</Type>
<ImageUrl>http://www.ironspeed.com</ImageUrl>
</ContainedComponent>
ImageButton Element
An ImageButton component specifies an image that can be clicked by the application user to do an action. Typically
this image is an icon.
Pass-through attributes
Pass-through
attributes
Description
CausesValidation
A Boolean value indicating whether the button causes validation or not. If True, the
button will try to validate the data entered on the page. If False, no validation is
performed. False is typically used as a value for the Cancel buttons while True is
used for OK or Save buttons.
CommandName
The name of the command. Command names for buttons are specified elsewhere in
this document.
Consumers
The consumer of the event when the image is clicked. Typically the value of this tag
is parent:record indicating that the parent record must receive the event.
RedirectURL
The URL for the button. It can be any valid URL or the special keyword Back to take
the application user back to the previous page.
RedirectArgument
Indicates whether any argument is to be passed on the URL and how to specify the
URL value.
ToolTip
The tool tip to display when the application user hovers over the tip.
Sample
<ContainedComponent>
<Name>EditIcon</Name>
<Type>ImageButton</Type>
<PassthroughAttributes>
<Attribute>
<Name>CausesValidation</Name>
<Value>True</Value>
z Page 717
</Attribute>
<Attribute>
<Name>CommandName</Name>
<Value />
</Attribute>
<Attribute>
<Name>Consumers</Name>
<Value>parent:record</Value>
</Attribute>
<Attribute>
<Name>ImageURL</Name>
<Value>/JobApplication/images/icon_edit.gif</Value>
</Attribute>
<Attribute>
<Name>RedirectArgument</Name>
<Value>ID</Value>
</Attribute>
<Attribute>
<Name>RedirectURL</Name>
<Value>EditApplication.aspx?ID={0}</Value>
</Attribute>
<Attribute>
<Name>ToolTip</Name>
<Value />
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
LinkButton Element
The link button displays a link that when clicked will redirect the application user to a different page either within the
application or outside to a different site.
Pass-through attributes
Pass-through
attributes
Description
CausesValidation
A Boolean value indicating whether the button causes validation or not. If True, the
button will try to validate the data entered on the page. If False, no validation is
performed. False is typically used as a value for the Cancel buttons while True is
used for OK or Save buttons.
z Page 718
Pass-through
attributes
Description
CommandName
The name of the command. Command names for buttons are specified elsewhere in
this document.
Consumers
The consumer of the event when the image is clicked. Typically the value of this tag
is parent:record indicating that the parent record must receive the event.
RedirectURL
The URL for the button. It can be any valid URL or the special keyword Back to take
the application user back to the previous page.
RedirectArgument
Indicates whether any argument is to be passed on the URL and how to specify the
URL value.
Text
ToolTip
The tool tip to display when the application user hovers over the tip.
Sample
<ContainedComponent>
<Name>Edit</Name>
<Type>LinkButton</Type>
<PassthroughAttributes>
<Attribute>
<Name>CausesValidation</Name>
<Value>False</Value>
</Attribute>
<Attribute>
<Name>CommandName</Name>
<Value>redirect</Value>
</Attribute>
<Attribute>
<Name>Consumers</Name>
<Value>None</Value>
</Attribute>
<Attribute>
<Name>RedirectURL</Name>
<Value>http://www.google.com</Value>
</Attribute>
<Attribute>
<Name>Text</Name>
<Value />
</Attribute>
z Page 719
<Attribute>
<Name>ToolTip</Name>
<Value />
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Label Element
The label specifies any label value to display on the page. The label may be generated using a Css class unlike a
Literal, which does not enclose the value in any HTML tag.
Pass-through attributes
Pass-through
attributes
Description
Text
The label text. HTML tags should not be used in the label. The label results in a
Label control inherited from the Label .NET control.
Sample
<ContainedComponent>
<Name>CategoryIDFieldValueLabel</Name>
<Type>Label</Type>
<PassthroughAttributes>
<Attribute>
<Name>Text</Name>
<Value>Category ID</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Literal Element
A literal component used to display text on the layout page. The literal value does not include any Css style unlike the
Label component.
Pass-through attributes
Pass-through
attributes
Description
Text
The label text. HTML tags should not be used in the literal.
z Page 720
Sample
<ContainedComponent>
<Name>Categories_DescriptionFieldLabel</Name>
<Type>Literal</Type>
<PassthroughAttributes>
<Attribute>
<Name>Text</Name>
<Value>Categories Description</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Menu Element
This component refers to a reusable panel specified by the Layout element. The current menu to highlight is passed
as a pass through attribute
Pass-through attributes
Pass-through
attributes
Description
HiliteSettings
The name of the menu item that should be highlighted when this page is displayed.
All other items are displayed in a normal state.
Sample
<ContainedComponent>
<Name>Menu</Name>
<Type>Menu</Type>
<Layout>Source\TUTORIAL PAGES\Menu.html</Layout>
<PassthroughAttributes>
<Attribute>
<Name>HiliteSettings</Name>
<Value>Products</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Pagination Element
The Pagination panel refers to a reusable panel specified by the Layout element. There are no pass-through attributes
to specify on this panel.
z Page 721
Pass-through attributes
None.
Sample
<ContainedComponent>
<Name>Pagination</Name>
<Type>Pagination</Type>
<Layout>..\OtherComponents\Pagination-Everest.html</Layout>
</ContainedComponent>
PagingControl Element
A PagingControl is a control that is used within the pagination panel or can be used directly on the page. The paging
control designates the next, previous, first, and last controls. Based on the PaginationType, the paging control
specifies the action to take. In addition to specifying the Pagination Type, event bindings must also be specified for
this control. The control name designates the control which when clicked passes the message to this control. The
event binding is hooked up both ways so that some buttons can be disabled when reaching the beginning or the end of
the records to display on a table.
Pass-through attributes
None.
Sample
<ContainedComponent>
<Name>Next</Name>
<Type>PagingControl</Type>
<PaginationType>NextPage</PaginationType>
<ControlName>NextButton</ControlName>
</ContainedComponent>
PushButton Element
An HTML push button control to be displayed on the layout page. The pass-through attributes specify the validation to
perform, the name of the command the redirect URL.
z Page 722
Pass-through attributes
Pass-through
attributes
Description
CausesValidation
A Boolean value indicating whether the button causes validation or not. If True, the
button will try to validate the data entered on the page. If False, no validation is
performed. False is typically used as a value for the Cancel buttons while True is
used for OK or Save buttons.
CommandName
The name of the command. Command names for buttons are specified elsewhere in
this document.
Consumers
The consumer of the event when the image is clicked. Typically the value of this tag
is parent:record indicating that the parent record must receive the event.
RedirectURL
The URL for the button. It can be any valid URL or the special keyword Back to take
the application user back to the previous page.
RedirectArgument
Indicates whether any argument is to be passed on the URL and how to specify the
URL value.
Text
ToolTip
The tool tip to display when the application user hovers over the tip.
Sample
<ContainedComponent>
<Name>Go</Name>
<Type>PushButton</Type>
<PassthroughAttributes>
<Attribute>
<Name>CausesValidation</Name>
<Value>False</Value>
</Attribute>
<Attribute>
<Name>CommandName</Name>
<Value>Search</Value>
</Attribute>
<Attribute>
<Name>Consumers</Name>
<Value>None</Value>
</Attribute>
<Attribute>
z Page 723
<Name>RedirectURL</Name>
<Value />
</Attribute>
<Attribute>
<Name>Text</Name>
<Value>Go</Value>
</Attribute>
<Attribute>
<Name>ToolTip</Name>
<Value />
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Record Element
The Record component specifies the source of the record to use when displaying field values being displayed on the
page. The user may not specify the Record component. In this case, Iron Speed Designer automatically generates
the record control without the presence of a record component in the properties file.
Pass-through attributes
Pass-through attributes
Description
InternalUse:DataSource
This attribute specifies the source of the Id to use for this record. Typically,
this is from the URL.
InternalUse:DataSourceArg
Specifies the QueryString parameter to use from the URL to get the Id of the
record being displayed.
Sample
<ContainedComponent>
<Name>Product</Name>
<Type>Record</Type>
<Table>Products</Table>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>URL</Value>
</Attribute>
<Attribute>
<Name>InternalUse:DataSourceArg</Name>
<Value>Product</Value>
</Attribute>
</PassthroughAttributes>
z Page 724
</ContainedComponent>
SearchFilter Element
The SearchFilter component specifies the criteria to use for the search control.
Pass-through attributes
Pass-through
attributes
Description
CaseSensitive
Fields
A comma delimited set of fields within the selected table where search should be
performed.
Operator
A comparison operator to use when looking up the values entered in the text box.
InternalUse:Table
The name of the table that contains the fields listed earlier.
V_TextBoxSearchT
extBoxColumns
Sample
<ContainedComponent>
<Name>SearchTextBox</Name>
<Type>SearchFilter</Type>
<PassthroughAttributes>
<Attribute>
<Name>CaseSensitive</Name>
<Value>False</Value>
</Attribute>
<Attribute>
<Name>Fields</Name>
<Value>ProductName</Value>
</Attribute>
<Attribute>
<Name>InternalUse:Table</Name>
<Value>Products</Value>
</Attribute>
<Attribute>
<Name>Operator</Name>
<Value>Contains</Value>
</Attribute>
z Page 725
<Attribute>
<Name>V_TextBoxSearchTextBoxColumns</Name>
<Value>18</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Selection Element
The Selection component specifies a radio button to display to select the current row within a table. The Selection
component is only available with a GEN:Table code generation tag.
Pass-through attributes
None.
Sample
<ContainedComponent>
<Name>RecordRowSelection</Name>
<Type>Selection</Type>
</ContainedComponent>
Table Element
The Table component corresponds to the GEN:Table code generation tag. It contains information about the database
table, view or query that is the source of the data to display in the browser.
Pass-through attributes
Pass-through attributes
Description
InternalUse:DataSource
Specifies the source of the data. In the case of one-to-many tables, the
source of the data is specified as the parent.
PageSize
Sample
<ContainedComponent>
<Name>Employees</Name>
<Type>Table</Type>
<Table>Employees</Table>
<PassthroughAttributes>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>TableOrQuery</Value>
</Attribute>
z Page 726
<Attribute>
<Name>PageSize</Name>
<Value>20</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
TableStatistic Element
Displays a statistic indicating the number of records in the database table, view or returned as part of a query. The
TableStatistic also allows you to display a total based on adding the value of a field.
This component is similar to the FieldStatistic component in almost all respects except that this component can be
used independently of a table. This component is very useful when displaying totals on a dashboard type layout page.
Pass-through attributes
Pass-through attributes
Description
FieldName
The name of the field to sum if the StatType is sum. If the StatType is count,
the field name is not used since the number of records is returned. Iron Speed
Designer automatically uses the first non-Id field to count the number of records
in the database that match the query.
InternalUse:DataSource
StatType
Sample
<ContainedComponent>
<Name>DiscountinuedProducts</Name>
<Type>TableStatistic</Type>
<Table>Products</Table>
<PassthroughAttributes>
<Attribute>
<Name>FieldName</Name>
<Value>ProductID</Value>
</Attribute>
<Attribute>
<Name>InternalUse:DataSource</Name>
<Value>TableOrQuery</Value>
</Attribute>
<Attribute>
<Name>StatType</Name>
z Page 727
<Value>count</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
Text Element
The Text component allows you to display any text value on the page. This is useful if the web designer creates a
layout page and the text on the page can be supplied at development time by the developer.
Pass-through attributes
Pass-through
attributes
Description
Text
Sample
<ContainedComponent>
<Name>Text1</Name>
<Type>Text</Type>
<PassthroughAttributes>
<Attribute>
<Name>Text</Name>
<Value>This is the text for the GEN:Text code generation tag.</Value>
</Attribute>
</PassthroughAttributes>
</ContainedComponent>
UserControl Element
The UserControl component specifies a generic reusable component based on the layout page specified. This can be
any layout page file. If you need to include your own controls on a layout page, the UserControl component is the best
way to incorporate them.
Pass-through attributes
None.
Sample
<ContainedComponent>
<Name>Employee1Panel</Name>
<Type>UserControl</Type>
<Layout>Source\TUTORIAL PAGES\EmployeePanel.html</Layout>
</ContainedComponent>
z Page 728
z Page 729
z Page 730
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that
redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To
prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it
may be distributed under the terms of this General Public License. The "Program", below, refers to any such program
or work, and a "work based on the Program" means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated
into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee
is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.
The act of running the Program is not restricted, and the output from the Program is covered only if its contents
constitute a work based on the Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium,
provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and
give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection
in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the
Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you
also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of
any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the
Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started
running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate
copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may
z Page 731
redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if
the Program itself is interactive but does not normally print such an announcement, your work based on the Program is
not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from
the Program, and can be reasonably considered independent and separate works in themselves, then this License,
and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the
same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the
terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every
part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the
intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on
the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this
License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable
form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under
the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than
your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source
code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software
interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This
alternative is allowed only for noncommercial distribution and only if you received the program in object code or
executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable
work, complete source code means all the source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and installation of the executable. However, as a special
exception, the source code distributed need not include anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs,
unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering
equivalent access to copy the source code from the same place counts as distribution of the source code, even though
third parties are not compelled to copy the source along with the object code.
z Page 732
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License.
Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate
your rights under this License. However, parties who have received copies, or rights, from you under this License will
not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you
permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do
not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you
indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a
license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You
may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not
responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to
patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the
conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to
satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence
you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution
of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy
both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the
section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest
validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution
system, which is implemented by public license practices. Many people have made generous contributions to the wide
range of software distributed through that system in reliance on consistent application of that system; it is up to the
author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted
interfaces, the original copyright holder who places the Program under this License may add an explicit geographical
distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if written in the body of this License.
z Page 733
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to
time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems
or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License
which applies to it and "any later version", you have the option of following the terms and conditions either of that
version or of any later version published by the Free Software Foundation. If the Program does not specify a version
number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are
different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation,
write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two
goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of
software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN
WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM
AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
.NET
ADO DataSet class .............................................389
z Page 734
Cache.................................................................. 371
Data application blocks ....................................... 389
DataGrid controls ........................................ 293, 389
DataList controls ................................................. 293
DataSets ............................................................. 389
Directives ............................................................ 506
Framework .......................................................... 457
Framework 1.1
Request validation security............................... 437
Impersonation ..................................................... 394
Performance........................................................ 400
Repeater controls........................................ 293, 389
Session management ......................................... 399
.NET Data Application Blocks .................................. 389
.NET Framework
Configuring and registering................................. 436
System.Data namespace.................................... 287
System.Utils namespace .................................... 287
System.Web namespace .................................... 288
V1.0
Designer.config ................................................. 283
Web.config ................................289, 401, 409, 446
V1.1
Designer.config ................................................. 283
Web.config ................................289, 401, 409, 446
@Register directives ........................................ 294, 506
{0} redirect argument................................................ 216
<COMPONENT>Access class................................. 326
<COMPONENT>AccessGen class .......................... 326
<COMPONENT>Record class................................. 324
<COMPONENT>RecordGen class .......................... 324
<PAGE> Class ......................................................... 318
<PAGE>Gen class ................................................... 317
Protected WithEvents declarations..................... 318
<PREFIX>Add.......................................................... 376
<PREFIX>Delete...................................................... 376
<PREFIX>DeleteRecords ........................................ 376
<PREFIX>DrillDown................................................. 377
<PREFIX>Export...................................................... 377
<PREFIX>Get .......................................................... 378
<PREFIX>GetList..................................................... 378
<PREFIX>GetStats .................................................. 379
<PREFIX>Update .................................................... 379
<TABLE>Access class............................................. 323
<TABLE>AccessGen class ...................................... 322
<TABLE>Record class............................................. 321
<Title> tag ................................................................ 581
A HelloWorld Example Using the Image Tag........... 119
A Quick Tour of Iron Speed Designer ....................... 22
Accessing Records with Filtered Queries ................ 633
Action, button ........................................................... 210
z Page 735
z Page 736
z Page 737
z Page 738
z Page 739
ImageButton........................................................ 177
In development process...................................... 113
In the generated code ......................................... 115
ItemTemplate .............................................. 154, 160
Label ................................................................... 148
Layout tags.......................................................... 143
LinkButton ........................................................... 178
Literal .................................................................. 149
Optional properties.............................................. 122
Other tags ........................................................... 192
Page templates ................................................... 491
Pagination ........................................................... 171
Prefixes ............................................................... 124
PushButton.......................................................... 179
Record................................................................. 140
Record selection ................................................. 225
Record tags......................................................... 140
Reserved names................................................. 125
SearchFilter......................................................... 186
SeparatorTemplate ............................................. 163
Syntax ................................................................. 123
Table ................................................................... 153
Table component tags ........................................ 168
TableStatistic....................................................... 174
Template ..................................................... 194, 492
Text ..................................................................... 151
Types .................................................................. 123
Use..............................................189, 459, 461, 464
Code Generation Tags
Overview ............................................................. 115
Code template files .................................................. 508
Coding Examples
Accessing Records with Filtered Queries ........... 633
Add record page ................................................. 531
Adding an Audit Trail........................................... 649
Adding custom data validation code ................... 592
Adding multiple menus to a page ....................... 583
Adding multiple records at one time ................... 613
Adding New Records .......................................... 619
Advanced page features ..................................... 580
Application-Wide Middle-Tier Filtering ................ 635
Calling Your Own Database Stored Procedures 625
Changing a dialog title ........................................ 580
Changing a Page Title ........................................ 580
Changing page titles ........................................... 581
Conditionally displaying components by search
result................................................................ 607
Conditionally displaying table columns ............... 609
Conditionally displaying tables by search result . 609
Conditionally formatting table text colors ............ 610
Conditionally hiding user interface controls ........ 604
z Page 740
z Page 741
z Page 742
Filtered Queries...................................................633
Filtering................................................635, 637, 641
Queries................................................................633
Updating Existing Records..................................621
Updating Existing Records From a Windows
Application .......................................................622
Data application blocks ............................................389
Data conversion options
Case conversion....................................................67
Constraint ..............................................................67
Default value .........................................................66
Display format .......................................................66
Storage format.......................................................67
Trim spaces...........................................................67
Data Conversion Options ...........................................66
Data reader folder.....................................................287
Data Source Properties ............................................224
Data sources ............................................................224
Adding a new record ...........................................228
Foreign key relationship ......................................230
Named queries ....................................................226
Parents record or current table row....................225
Table ...................................................................226
URL query string .................................................229
Data Transmission Encryption .................................396
Data validation..............................................56, 59, 592
Disabling Concurrency ........................................596
Field types .............................................................59
Field values .........................................................596
In Professional Edition and Enterprise Edition....410
DataAccess folder ............................................273, 280
Database
Authentication......................................................431
Concurrency control ............................................383
Connecting ............................................................37
Connection pooling .............................................327
Connection settings.............................................419
Cursor management ...........................................386
Database name restrictions ..................................37
Disconnecting........................................................39
Error handling......................................................390
Field name restrictions ..........................................37
Foreign key use...................................................382
Inline SQL generation .........................................108
Logging in..............................................................35
Microsoft SQL Server name..................................34
Multi-database support in Professional Edition and
Enterprise Edition ............................................410
Optimistic concurrency........................................385
Password...............................................................35
Pessimistic concurrency......................................385
z Page 743
z Page 744
z Page 745
z Page 746
z Page 747
z Page 748
z Page 749
z Page 750
Options.................................................................. 62
Passing values in URLs ..................................... 216
References to other databases........................... 383
Self-referential..................................................... 383
Support for virtual................................................ 410
Table joins............................................................. 63
Using as data sources ........................................ 230
Virtual ............................................................ 64, 231
Foreign Keys
Specifying in code............................................... 482
Formatting
Currency................................................................ 70
Custom numeric formats....................................... 70
Date and time strings ............................................ 69
Decimal number.................................................... 70
Field options.......................................................... 66
Full date and time ................................................. 69
Long date .............................................................. 69
Numeric strings ..................................................... 69
Percentage............................................................ 70
Short date.............................................................. 69
US states............................................................... 70
Formatting options ..................................................... 66
Frames ............................................................. 292, 478
Generated applications ....................................... 478
Full date and time format ........................................... 69
Full-text search.................................186, 537, 565, 567
Case sensitivity ........................................... 187, 250
Generating automatically .................................... 106
Full-Text Search ....................................................... 388
FV (field value) button redirect parameter ............... 215
FVS (field value string) button redirect parameter ... 215
Generated .NET Controls......................................... 266
Generated .NET Pages............................................ 266
Generated Classes .................................................. 267
Generated pages
DHTML use ......................................................... 291
Frames use ......................................................... 292
Generated SQL Statements..................................... 372
Generating Crystal Reports Documents .................. 659
Generating Your Own Custom Code ....................... 508
Get method....................................................... 320, 324
getCreate_Date method........................................... 337
getCreate_DateAsSqlType method ......................... 337
getCreator_Id method .............................................. 337
getCreator_IdAsSqlType method............................. 337
GetCustomizedPagePath method ........................... 330
getDisplayString method .......................................... 336
GetHashCode method ..................................... 337, 338
getId method .................................................... 337, 339
getIdAsSqlType method................................... 337, 339
GetList ......................................................................483
GetRecord method ...........................................322, 330
GetSessionNavigationHistory method......................331
getString method ......................................................336
GetTable method......................................................331
getTypeName method..............................................336
getUpdate_Date method ..........................................337
getUpdate_DateAsSqlType method.........................337
getUpdater_Id method..............................................337
getUpdater_IdAsSqlType method ............................337
getValue method ......................................................336
getVariable method ..................................336, 338, 339
Globalization resources folder..................................283
Go to Next button command ....................................243
Go to Page ...............................................................212
Go to Previous button command..............................243
Grand total..................................................................43
Grand totals ..............................................................544
Group code generation tag.......................................493
Group tag
Description of ..............................................192, 193
Handling Errors in Properties Files...........................684
Handling SQL Injection Attacks................................398
Header element ........................................................715
Header panel
Page-level property .............................................133
Panel types..........................................................490
HeaderTemplate tag
Description of ......................................................165
Hierarchy in Properties Files ....................................682
HiliteSettings pass-through attribute ........................251
How Code Generation Tags Work ...........................121
How Iron Speed Designer Works .............................112
HTML
Headers, bodies and other page sections ..........294
HTML element ..........................................................715
HTML encode white space
FieldValue tag .............................................204, 206
HTML tag.............................................................145
Label tag..............................................................149
Literal tag.............................................................150
HTML tag
Description of ......................................................143
Display properties................................................144
HTML display style ..............................................144
HTML encode white space..................................145
Pass-through attributes .......................................249
Properties ............................................................143
HTML.................................................................144
HTML encode white space................................145
Text pass-through attribute .................................249
z Page 751
z Page 752
Files..................................................................... 289
In generated pages ............................................. 291
IronSpeedWebForm.js ........................................ 270
IronSpeedWebUIValidation.js ............................. 271
Joining multiple tables.............................................. 232
Joins
Multi-table.................................................... 232, 574
Justification................................................................. 41
Keeping a Page On-Screen After Clicking Save...... 582
Label
FieldLabel tag display style................................. 138
Label display style.................................................... 198
Label element........................................................... 720
Label presentation control tag.................................. 304
Label tag
Description of ...................................................... 148
HTML encode white space ................................. 149
Label text............................................................. 149
Pass-through attributes....................................... 249
Properties............................................................ 148
HTML encode white space ............................... 149
Label text .......................................................... 149
Label Tag Pass-Through Attributes ......................... 249
Labels
Showing and disabling .......................................... 41
Large list selector
Enabled pass-through attribute........................... 248
MinListItems pass-through attribute.................... 248
Large List Selector ................................................... 587
Creating............................................................... 585
Layout page files ........................................................ 28
Layout page Files
Embedding code ................................................. 478
Embedding controls ............................................ 475
Layout pages............................................................ 114
Adding an existing page...................................... 127
Definition ............................................................. 113
Enter key handling .............................................. 313
Linking generated layout pages .......................... 129
Modifying generated layout pages...................... 128
Layout Tags.............................................................. 143
LDAP ........................................................................ 396
Link button display style ........................................... 201
LinkButton element .................................................. 718
LinkButton presentation control tag ......................... 304
LinkButton tag
Description of ...................................................... 178
Pass-through attributes....................................... 243
Properties............................................................ 178
Action ................................................................ 210
Button text......................................................... 209
z Page 753
z Page 754
z Page 755
Justification ........................................................... 41
Order ..................................................................... 41
Page total .............................................................. 43
Required................................................................ 41
Searchable ............................................................ 42
Show field.............................................................. 41
Show label............................................................. 41
Sortable................................................................. 42
Page consumer ........................................................ 244
Page Encoding ........................................................... 98
Page Flashing .......................................................... 292
Page History (Back Button) Handling ...................... 313
Page Level Properties.............................................. 132
Page Level Security Options.................................... 134
Page properties configuration .................................. 131
Page redirection ....................................................... 220
Page Redirection...................................................... 217
Page Style Options .................................................. 106
Page styles
Automatic layout page creation........................... 107
Creating page templates..................................... 486
Selecting in Application Builder............................. 33
Page templates .......................................................... 28
Add record page ................................................. 487
Add record pages.................................. 29, 105, 284
ASP.NET directives ............................................ 506
Creating and customizing ................................... 486
Definition of ................................................. 487, 491
Delete record function........................................... 30
Edit record page.................................................. 487
Edit record pages.................................. 29, 105, 284
Edit table page .................................................... 487
Edit table pages .................................................. 284
Export table dialog ................................................ 30
Modifying............................................................. 491
Pre-defined page types......................................... 28
Record page templates....................................... 493
Show record page............................................... 487
Show record pages ............................... 29, 105, 285
Show table page ................................................. 487
Show table pages ................................. 28, 105, 285
Sign in and sign out pages.................................. 284
Table pages ........................................................ 498
Using with Application Builder............................. 114
Page Templates ....................................................... 487
Page templates folder .............................................. 284
Page title .................................................................. 133
Page titles
Changing............................................................. 581
Changing dialog page title .................................. 580
Localizing ............................................................ 102
z Page 756
Pages
Automatic page creation
Page style options............................................. 106
Pages
Page location ...................................................... 107
Pages
HTTP headers and bodies .................................. 294
Pages folder ............................................................. 278
PageSize pass-through attribute.............................. 250
Pagination ................................................................ 567
Pagination control .................................................... 171
Pagination element .................................................. 721
Pagination panel
Page-level property............................................. 133
Panel types ......................................................... 490
Pagination tag
Description of ...................................................... 171
Properties............................................................ 171
Paging
Database tier....................................................... 646
Middle tier............................................................ 646
Paging and Sorting in the Database Tier vs. Middle
Tier........................................................................ 646
PagingControl class ................................................. 369
PagingControl element............................................. 722
PagingControl presentation control tag.................... 307
Panel presentation control tag ................................. 307
Panels .............................................................. 459, 490
Adding reusable panels ...................................... 460
Button.................................................. 133, 461, 490
Definition of ......................................................... 490
Footer.......................................................... 133, 490
Header ........................................................ 133, 490
Menu ................................................... 133, 464, 490
Menu_Item .......................................................... 490
Menu_Item_Highlighted ...................................... 490
Pagination ................................................... 133, 490
Range filter.......................................................... 133
Range_Filter........................................................ 490
Record information.............................................. 469
Reusable ............................................................. 459
Search......................................................... 133, 490
Table ................................................................... 133
User control......................................................... 133
Panels Requiring Record Information ...................... 469
Parameter Passing in URLs .................................... 217
Parent control consumer .......................................... 244
Parent-child pages
Configuring............................................................ 43
Parent-child table pages .......................................... 562
ParentIdField pass-through attribute........................ 251
z Page 757
In User Table.........................................................85
PasswordValidator class ..........................................356
PasswordValidator presentation control tag.............306
Percentage field type............................................61, 68
Percentage number formatting...................................70
PercentageValidator class........................................357
Performance .....................................................399, 400
SQL query ...........................................................373
Personal firewalls .....................................................436
Personal Web Server ...............................................455
Security ...............................................................455
Virtual directory configuration..............................455
Personal Web Server Security .................................455
Personal Web Server Virtual Directory Configuration
..............................................................................455
Pessimistic Concurrency ..........................................385
PhysicalRecord class ...............................................336
PhysicalTableAccess class ......................................341
PhysicalTableAccess classes ..................................340
PK (primary key) button redirect parameter .............215
PlaceHolder presentation control tag .......................308
Placing ASP.NET Directives in Page Template Files
..............................................................................506
Placing Role Information in Your User Table .............87
Potentially dangerous Request.Form value .............437
Potentially dangerous XML...................................439
PrecompilePageFiles ...............................................406
Pre-Defined Page Types ............................................28
Pre-Selecting Field Values Based on Logged-In User
..............................................................................599
Presentation control tag
BasePageSettings...............................................297
Button ..................................................................296
CategoryFilterControl ..........................................297
CompareValidator ...............................................298
CustomValidator..................................................299
DateFieldValueFilterControl ................................299
DropDownList......................................................300
FieldNameLabel ..................................................301
FieldSortControl ..................................................302
FieldValueTextBox ..............................................301
FieldValueValidator .............................................301
HyperLink ............................................................302
Image ..................................................................303
ImageButton ........................................................303
Label....................................................................304
LinkButton ...........................................................304
MenuLink.............................................................305
NumberValidator .................................................305
PagingControl......................................................307
Panel ...................................................................307
z Page 758
z Page 759
Redirect URL.....................................................214
Send event notification to..................................212
Tool tip...............................................................210
Validate page data ............................................210
Putting It All Together.................................................83
Queries .....................................................................574
Query Name Restrictions ...........................................76
Query string parameters...........................................126
QueryFunction
Count...................................................................251
Sum .....................................................................251
QueryFunction pass-through attribute......................251
QueryParameter pass-through attribute...................251
Radio button display style ........................................200
Radio button lists
Specifying items ..................................................207
Radio buttons ...........................................................517
RadioButton presentation control tag .......................308
Range filter panel
Page-level property .............................................133
Range_Filter panel
Panel types..........................................................490
RangeValidator class................................................357
Record class files .....................................................273
Generated class files...........................................275
Safe class files ....................................................275
Record classes .................................................319, 334
Record display................. 513, 515, 517, 520, 565, 567
Record element ........................................................724
Record Page Creation Options ................................106
Record Page Templates...........................................493
Record pages
Add record...........................................................531
Automatic page creation options.........................106
Edit record ...........................................................528
Record Row Layout ..................................................154
Record Selection ......................................................225
Record tag
Description of ......................................................140
HTML use inside of .............................................141
Pass-through attributes .......................................251
Properties ............................................................140
Record Tags .............................................................140
RecordControlCustomValidator class ......................358
RecordControlCustomValidator presentation control
tag .........................................................................309
RecordControlImageButton presentation control tag
..............................................................................309
RecordGen class ......................................................320
Redirect argument ....................................................216
Redirect Argument....................................................245
z Page 760
z Page 761
Running applications.................................................. 50
Running Applications on Multiple Servers ............... 399
Running Your Application........................................... 50
Run-time Application Tracing ................................... 452
Run-Time Configuration Elements ........................... 408
Safe Base Classes................................................... 267
Sample filters ........................................................ 106
Save function............................................................ 582
SaveData pass-through attribute ............................. 248
SavePageStateToCache method............................. 333
Scalability ................................................................. 399
Concurrent users ................................................ 400
Running applications on multiple servers ........... 399
Schema information ................................................... 57
Search ......................................186, 388, 537, 565, 567
Search button action ................................................ 210
Search button command .......................................... 243
Search control
Generating automatically .................................... 106
Search events .......................................................... 255
Search panel
Page-level property............................................. 133
Panel types ......................................................... 490
Search tag
Case sensitivity in searches................................ 187
Fields to search................................................... 187
Search operator .................................................. 187
Table to search ................................................... 187
Text box columns................................................ 187
Searchable ................................................................. 42
SearchFilter element ................................................ 725
SearchFilter tag
CaseSensitive pass-through attribute................. 250
Columns pass-through attribute.......................... 250
Description of ...................................................... 186
Display properties ............................................... 186
Fields pass-through attribute .............................. 250
Operator pass-through attribute.......................... 250
Pass-through attributes....................................... 249
Properties............................................................ 186
Case sensitive................................................... 187
Fields................................................................. 187
Operator............................................................ 187
Table, view or queries....................................... 187
Text box columns.............................................. 187
Search data properties........................................ 187
SearchFilter Tag Pass-Through Attributes............... 249
SearchTextControl class .......................................... 370
SearchTextControl presentation control tag ............ 310
Secondary sort order................................................ 159
Securing web pages..................................... 79, 88, 134
z Page 762
z Page 763
Storage formats.......................................................... 67
Boolean ................................................................. 71
Credit Card Expiration Date .................................. 71
Currency................................................................ 71
Date....................................................................... 71
Decimal Number ................................................... 71
Percentage............................................................ 71
US State................................................................ 72
Stored procedures
Calling your own ................................................. 625
Generating .......................................................... 108
In Professional Edition and Enterprise Edition.... 410
Inline SQL vs. stored procedures ....................... 373
Stored procedures folder.......................................... 281
Storing Extra Information at Sign-In Time................ 657
String field type........................................................... 61
Strings
BaseClasses.resx error message file ................. 101
Btn resource key prefix ....................................... 102
Err resource key prefix........................................ 102
ProjectTemplate.resx error message file ............ 100
Txt resource key prefix........................................ 102
Val resource key prefix ....................................... 102
Style sheets
Best uses of ........................................................ 264
Style Sheets ............................................................. 505
Style.css file ............................................................. 282
Styles folder...................................................... 281, 282
Switching Between .NET Framework 1.0 and 1.1 .. 409,
446
Switching to .NET Framework V1.0 ......................... 447
Switching to .NET Framework V1.1 ......................... 446
Syntax of code generation tags................................ 123
Tab bars ................................................................... 464
Table
Editable ............................................................... 156
Table access class files ........................................... 274
Generated class files .......................................... 275
Safe class files .................................................... 275
Table access classes ............................................... 321
Table and Properties Files ....................................... 680
Table binding files .................................................... 680
Location............................................................... 280
Table Component Tags............................................ 168
Table components
Default sort order ................................................ 159
Default table size ................................................ 159
Editable ............................................................... 156
Secondary sort order .......................................... 159
Table Components
Conditionally displaying by search result............ 609
z Page 764
Tables
Editable ....................................................... 284, 498
Sortable............................................................... 541
Sorting................................................................. 648
TableStatistic element.............................................. 727
TableStatistic tag
Count calculation ................................................ 175
Count pass-through attribute .............................. 251
Data source properties........................................ 175
Description of ...................................................... 174
Display properties ............................................... 175
Field to calculate ................................................. 175
Pass-through attributes....................................... 251
Properties............................................................ 174
Field .................................................................. 175
Statistic type...................................................... 175
QueryFunction pass-through attribute ................ 251
QueryParameters pass-through attribute ........... 251
Statistic type........................................................ 175
Sum calculation................................................... 175
Sum pass-through attribute................................. 251
TableName pass-through attribute ..................... 251
TableStatistic Tag Pass-Through Attributes ............ 251
Tags
Server control...................................................... 290
Target pass-through attribute................................... 249
Target Window ................................................. 146, 249
HyperLink tag display style ................................. 146
Template code generation tag ................................. 492
Template files
Code.................................................................... 508
Page.................................................................... 487
Template tag
Description of ...................................................... 194
Template tag types
AddOneRecord ................................................... 492
EditMultipleRecords ............................................ 492
EditOneRecord ................................................... 492
ViewMultipleRecords .......................................... 492
ViewOneRecord.................................................. 492
Text
HyperLink tag display style ................................. 146
Text box display style............................................... 198
Text box rows display style ...................................... 208
Text box width display style ..................................... 208
Text element............................................................. 728
Text mode display style............................................ 208
Text pass-through attribute ...................... 245, 247, 249
Text tag
Description of ...................................................... 151
Display properties ............................................... 151
z Page 765
Description of ......................................................189
HiliteSettings pass-through attribute ...................251
Pass-through attributes .......................................251
Properties ............................................................189
Use Tag Pass-Through Attributes ............................251
Use the Application Builder to Change the Layout Page
..............................................................................128
Use the Editor in Iron Speed Designer to Change the
Layout Page..........................................................128
Use Your Favorite HTML Editor to Further Customize
the Generated Layout Page..................................128
User accounts
Creating for role-based security ............................84
User authentication.....................................................88
User Authentication and Access Control for .NET ...392
User control panel
Page-level property .............................................133
User ID field
In roles table....................................................87, 88
In User table ..........................................................86
In User Table.........................................................85
User Input Validation Errors .....................................390
User interface
Code......................................................................20
Web pages ............................................................20
User interface control classes ..................................334
User name
Database server ....................................................35
User names and passwords.................................85, 86
User roles ...................................................................86
User Sign-In Page ......................................................88
User Sign-Out Page ...................................................88
User table
Definition of ...........................................................84
Password field .......................................................85
Password field selection........................................86
Selecting................................................................85
Selecting for role-based security...........................85
User ID field...........................................................85
User ID field selection ...........................................86
User name field .....................................................85
User name field selection......................................86
User tables
Adding role information .........................................87
UserControl element.................................................728
User-Defined Database Field Types ..........................62
Using a Large List Selector ......................................587
Using built-in functions .............................................234
Using Custom Functions ..........................................235
Using DHTML in Generated Pages..........................291
Using External DLLs in Applications........................669
z Page 766
z Page 767
z Page 768