Iron Speed Designer Application Developers Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 768

Iron Speed Designer

Application Developers Guide


Version 1.6
Accelerated web application development

Updated May 12, 2004

Iron Speed, Inc.


1953 Landings Drive
Mountain View, CA 94043
650.215.2200
www.ironspeed.com

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

Introducing Iron Speed Designer....................................................................................................... 18


A Quick Tour of Iron Speed Designer................................................................................................. 22
Creating Your First Application........................................................................................................... 26
Creating Web Pages with the Application Builder ..............................................................................................28
Step 1: Name Your Application ...........................................................................................................................31
Step 2: Select a Web Page Style........................................................................................................................33
Step 3: Connect to a Database Server ...............................................................................................................34
Step 4: Select Database Tables .........................................................................................................................36
Step 5: Configure Web Pages ............................................................................................................................40
Step 6: Create a Navigation Menu......................................................................................................................46
Step 7: Select a Start Page.................................................................................................................................47
Step 8: Build Your Application.............................................................................................................................48

Building and Running Your First Application.................................................................................... 49


Building an Application........................................................................................................................................50
Running Your Application....................................................................................................................................51

PART II: CUSTOMIZING YOUR APPLICATION .................................................................. 53


Setting the Start Page and Error Pages.............................................................................................. 55
Setting Default Field Display and Data Validation............................................................................. 57
Field Display Options ..........................................................................................................................................60
Field Validation Types....................................................................................................................................61
User-Defined Database Field Types..............................................................................................................64
Primary and Foreign Key Options.......................................................................................................................65
Adding Virtual Primary Key Relationships .....................................................................................................65
Adding Virtual Foreign Key Relationships .....................................................................................................66
Data Conversion Options ....................................................................................................................................69

z Page 3

Display Format Options .................................................................................................................................70


Storage Format Options.................................................................................................................................75
Enumerated Value Field Constraints .............................................................................................................76
Adding Not-Null Field Constraints..................................................................................................................77

Adding a Custom Named Query.......................................................................................................... 78


Incorporating Database Changes ....................................................................................................... 81
Updating Database Schemas for Your Application.............................................................................................81
Deleting Tables from Your Database..................................................................................................................82

Securing Web Pages with Role-Based Security ................................................................................ 83


Role-Based Security Overview ...........................................................................................................................83
Step 1: Enable Role-Based Security..................................................................................................................88
Step 2: Select Roles Table.................................................................................................................................91
Step 3: Configure Sign-In and Sign Out Pages .................................................................................................93
Step 4: Configure Web Pages for Role-Based Security ....................................................................................95
Administering Your Application ...........................................................................................................................97

Localizing (Internationalizing) Your Application ...............................................................................99


Culture Encoding...............................................................................................................................................100
Page Encoding..................................................................................................................................................103
Character Sets ..................................................................................................................................................103
Currency Formatting and Validation .................................................................................................................104
Date Formatting and Validation ........................................................................................................................104
Error and Validation Message Strings ..............................................................................................................104
Enabling Language Support in Microsoft Windows ..........................................................................................109
United States Phone Numbers, States and ZIP Codes ....................................................................................110

Configuring Iron Speed Designer Options....................................................................................... 111


Configuring the Application Builder...................................................................................................................111
Configuring Build Options .................................................................................................................................113

PART III: CUSTOMIZING PAGE LAYOUT ....................................................................... 116


Creating Layout Pages....................................................................................................................... 119
What is a Layout Page? ....................................................................................................................................121
Code Generation Tags......................................................................................................................................122
Binding Components to the Database ..............................................................................................................125
A Hello World Example Using the Image Tag ................................................................................................126
How Code Generation Tags Work ....................................................................................................................128
Code Generation Tag Syntax............................................................................................................................130
The FieldValue Tag Basic Database Field Display........................................................................................132
A Stand-Alone FieldValue Tag ....................................................................................................................133
Using Multiple FieldValue Tags ...................................................................................................................134
Adding Custom Layout Pages ..........................................................................................................................134
Modifying Layout Pages....................................................................................................................................135

z Page 4

Linking Generated Add, Edit, Show Record, and Show Table Layout Pages ..................................................136

Setting Code Generation Tag Properties .........................................................................................138


Page Level Properties.......................................................................................................................................139
Page Level Security Options.............................................................................................................................141

Field Display Tags .............................................................................................................................. 142


FieldValue Code Generation Tag .....................................................................................................................142
FieldLabel Code Generation Tag......................................................................................................................144

Record Tags ........................................................................................................................................ 148


Record Code Generation Tag ...........................................................................................................................148

Layout Tags......................................................................................................................................... 151


HTML Code Generation Tag.............................................................................................................................151
HyperLink Code Generation Tag ......................................................................................................................153
Image Code Generation Tag.............................................................................................................................155
Label Code Generation Tag..............................................................................................................................157
Literal Code Generation Tag.............................................................................................................................158
Text Code Generation Tag................................................................................................................................159

Table Tags ........................................................................................................................................... 161


Table Code Generation Tag..............................................................................................................................161
ItemTemplate Code Generation Tag ................................................................................................................168
AlternatingItemTemplate Code Generation Tag ...............................................................................................170
SeparatorTemplate Code Generation Tag........................................................................................................171
HeaderTemplate Code Generation Tag............................................................................................................173
FooterTemplate Code Generation Tag .............................................................................................................174

Table Component Tags ...................................................................................................................... 176


FieldStatistic Code Generation Tag ..................................................................................................................176
Pagination Code Generation Tag .....................................................................................................................179
TableStatistic Code Generation Tag.................................................................................................................182

Button Tags......................................................................................................................................... 185


ImageButton Code Generation Tag ..................................................................................................................185
LinkButton Code Generation Tag .....................................................................................................................186
PushButton Code Generation Tag....................................................................................................................187

Filter Tags............................................................................................................................................ 189


CategoryFilter Code Generation Tag................................................................................................................189
FieldFilter Code Generation Tag.......................................................................................................................191
SearchFilter Code Generation Tag ...................................................................................................................195

Component Use Tags......................................................................................................................... 198


Use Code Generation Tag ................................................................................................................................198

z Page 5

Other Tags........................................................................................................................................... 201


Comment Code Generation Tag.......................................................................................................................201
Group Code Generation Tag.............................................................................................................................202
ForEach Code Generation Tag.........................................................................................................................203
Template Code Generation Tag .......................................................................................................................203
Align Code Generation Tag...............................................................................................................................204

FieldValue Tag Properties.................................................................................................................. 206


FieldValue Tag Data Source Properties ...........................................................................................................207
FieldValue Tag Display Style Properties...........................................................................................................207
FieldValue Tag Dropdown List Display Style Options ......................................................................................212
FieldValue Tag Image Button Action Options ...................................................................................................213
FieldValue Tag Label Display Style Options.....................................................................................................213
FieldValue Tag Link Button Action Options ......................................................................................................213
FieldValue Tag List Box Display Style Options.................................................................................................214
FieldValue Tag Literal Display Style Options....................................................................................................214
FieldValue Tag Push Button Action Options.....................................................................................................215
FieldValue Tag Radio Button List Display Style Options ..................................................................................215
FieldValue Tag Text Box Display Style Options ...............................................................................................216

Button Actions and Properties.......................................................................................................... 219


Passing Primary and Foreign Key Values in URLs..........................................................................................228
Passing Parameters in URLs ...........................................................................................................................230
Enabling an Edit Icon in a Table Control ........................................................................................................232
Returning a Show Table Page with Fresh Data................................................................................................233
Calling a Custom Function when a Button is Clicked .......................................................................................234
Opening a Page in a New Browser Window .....................................................................................................235

Data Source Properties ...................................................................................................................... 236


Sourcing From Parents Record or Current Row in a Table .............................................................................237
Sourcing From a Table or Query ......................................................................................................................238
Adding a New Record to a Database Table......................................................................................................240
Sourcing From URL Query String Parameters .................................................................................................241
Sourcing From Foreign Key Relationships .......................................................................................................242
Advanced Filter Criteria (Multi-Table Joins)......................................................................................................244
Joining multiple tables..................................................................................................................................245
Selecting a constant value ...........................................................................................................................245
Passing parameters in a URL query string ..................................................................................................246
Using built-in functions.................................................................................................................................247
Using Custom Functions..............................................................................................................................248

Custom Pass-Through Attributes ..................................................................................................... 251


Using Pass-Through Attributes in Iron Speed Designer ...................................................................................252
Button Tag Pass-Through Attributes.................................................................................................................256
CategoryFilter Tag Pass-Through Attributes ....................................................................................................260
FieldFilter Tag Pass-Through Attributes ...........................................................................................................261
FieldLabel Tag Pass-Through Attributes ..........................................................................................................262
FieldStatistic Tag Pass-Through Attributes.......................................................................................................262

z Page 6

FieldValue Tag Pass-Through Attributes ..........................................................................................................263


HTML, Literal and Text Tag Pass-Through Attributes ......................................................................................265
Hyperlink Tag Pass-Through Attributes ............................................................................................................265
Label Tag Pass-Through Attributes ..................................................................................................................266
SearchFilter Tag Pass-Through Attributes........................................................................................................266
Table Tag Pass-Through Attributes ..................................................................................................................267
TableStatistic Tag Pass-Through Attributes .....................................................................................................268
Use Tag Pass-Through Attributes.....................................................................................................................269
FieldValue, Record Control, and Table Control Query Panel Pass-Through Attributes ...................................269

Producer Consumer Events .............................................................................................................. 270


Producer Consumer Event Types.....................................................................................................................271
Binding Producer Consumer Events.................................................................................................................273
Binding an Edit Button in a Show Table Page................................................................................................275

PART IV: EXTENDING GENERATED APPLICATION CODE ................................................ 277


Integrating Custom Code with Your Application............................................................................. 282
Architecture of Generated Applications........................................................................................... 284
Tier 1: The Presentation Layer .........................................................................................................................285
Tier 2: The Application Layer (Business Objects).............................................................................................285
Tier 3: The Database Layer ..............................................................................................................................286
Application Compilation and Configuration Tools .............................................................................................287

Application Folder Organization ....................................................................................................... 288


...\<Application Folder> .....................................................................................................................................288
Files generated by Iron Speed Designer .....................................................................................................289
Files provided for convenience ....................................................................................................................291
...\<Application Folder>\bin ...............................................................................................................................291
...\<Application Folder>\DataAccess.................................................................................................................292
Data model class-related files......................................................................................................................294
Example: An Orders Table...........................................................................................................................294
...\<Application Folder>\Images ........................................................................................................................295
...\<Application Folder>\<Subfolder> ................................................................................................................295
...\<Application Folder>\OtherComponents.......................................................................................................297
...\<Application Folder>\OtherPages.................................................................................................................297
...\<Application Folder>\Source.........................................................................................................................298
...\<Application Folder>\Source\Bin ..................................................................................................................299
...\<Application Folder>\Source\DataAccess ....................................................................................................300
...\<Application Folder>\Source\Images............................................................................................................300
...\<Application Folder>\Source\OtherComponents ..........................................................................................300
...\<Application Folder>\Source\OtherPages ....................................................................................................300
...\<Application Folder>\Source\<Subfolder> ....................................................................................................300
...\<Application Folder>\Source\Styles..............................................................................................................301
...\<Application Folder>\StoredProcedures .......................................................................................................301
...\<Application Folder>\Styles ..........................................................................................................................302

z Page 7

Iron Speed Designer File Folder Organization................................................................................. 303


...\<Iron Speed Folder>\Designer......................................................................................................................303
...\<Iron Speed Folder>\Designer\Bin ...............................................................................................................303
...\<Iron Speed Folder>\Designer\Globalization\Resources .............................................................................303
...\<Iron Speed Folder>\Designer\Page Templates ..........................................................................................304
...\<Iron Speed Folder>\IronSpeedBase ...........................................................................................................305
...\<Iron Speed Folder>\IronSpeedBase\Bin .....................................................................................................306
...\<Iron Speed Folder>\IronSpeedBase\Configuration.....................................................................................307
...\<Iron Speed Folder>\IronSpeedBase\Data...................................................................................................307
...\<Iron Speed Folder>\IronSpeedBase\Data\Columns ...................................................................................308
...\<Iron Speed Folder>\IronSpeedBase\Data\DataReader ..............................................................................308
...\<Iron Speed Folder>\IronSpeedBase\Data\SQLProvider.............................................................................308
...\<Iron Speed Folder>\IronSpeedBase\obj .....................................................................................................308
...\<Iron Speed Folder>\IronSpeedBase\Utils ...................................................................................................308
...\<Iron Speed Folder>\IronSpeedBase\Web...................................................................................................309
...\<Iron Speed Folder>\ProjectTemplate..........................................................................................................309
...\<Iron Speed Folder>\ProjectTemplate\Source\Bin .......................................................................................310

Generated Web Pages........................................................................................................................ 311


Server Control Tags ..........................................................................................................................................311
Client-Side JavaScript in Generated Pages......................................................................................................312
Using DHTML in Generated Pages ..................................................................................................................312
Using Frames in Generated Web Pages ..........................................................................................................313
Browser Compatibility .......................................................................................................................................314
Table Controls and .NET DataGrid Controls.....................................................................................................314
Register Directives and Code Generation Tags ...............................................................................................315
Custom HTTP Headers, Bodies, and Other Page Sections .............................................................................315

Presentation Layer Control Tags ...................................................................................................... 317


Overview ...........................................................................................................................................................317
Common Elements............................................................................................................................................317
BaseClasses:Button control tag ........................................................................................................................317
BaseClasses:BasePageSettings control tag.....................................................................................................318
BaseClasses:CategoryFilterControl control tag ................................................................................................318
BaseClasses:CompareValidator control tag .....................................................................................................319
BaseClasses:CustomValidator control tag........................................................................................................320
BaseClasses:DateFieldValueFilterControl control tag......................................................................................321
BaseClasses:DropDownList control tag............................................................................................................321
BaseClasses:FieldNameLabel control tag ........................................................................................................322
BaseClasses:FieldValueTextBox control tag ....................................................................................................322
BaseClasses:FieldValueValidator control tag ...................................................................................................323
BaseClasses:FieldSortControl control tag ........................................................................................................323
BaseClasses:HyperLink control tag ..................................................................................................................324
BaseClasses:ImageButton control tag..............................................................................................................324
BaseClasses:Image control tag ........................................................................................................................325
BaseClasses:Label control tag .........................................................................................................................326
BaseClasses:LinkButton control tag .................................................................................................................326
BaseClasses:MenuLink control tag...................................................................................................................326
BaseClasses:NumberValidator control tag .......................................................................................................327

z Page 8

BaseClasses:PasswordValidator control tag ....................................................................................................328


BaseClasses:Panel control tag .........................................................................................................................328
BaseClasses:PagingControl control tag ...........................................................................................................329
BaseClasses:PlaceHolder control tag...............................................................................................................330
BaseClasses:RadioButton control tag ..............................................................................................................330
BaseClasses:RequiredFieldValidator control tag .............................................................................................330
BaseClasses:RecordControlCustomValidator control tag ................................................................................331
BaseClasses:RecordControlImageButton control tag ......................................................................................331
BaseClasses:ShortDateValidator control tag....................................................................................................332
BaseClasses:SearchTextControl control tag ....................................................................................................332
BaseClasses:TableControlRadioButton control tag..........................................................................................333
BaseClasses:TableControlRepeater control tag...............................................................................................333
BaseClasses:TableControlFieldSumLabel control tag .....................................................................................334
BaseClasses:TextBox control tag .....................................................................................................................334
BaseClasses:TextBoxMaxLengthValidator control tag.....................................................................................334

Special Key and Button Handling ..................................................................................................... 336


Page History (Back Button) Handling ...............................................................................................................336
Capturing the Enter Key in Layout Pages.........................................................................................................336

Generated Application Layer Classes .............................................................................................. 339


Page Classes ....................................................................................................................................................340
<PAGE>Gen Class ......................................................................................................................................340
<PAGE> Class.............................................................................................................................................341
Record Classes.................................................................................................................................................342
<TABLE>RecordGen Class .........................................................................................................................343
<TABLE>Record Class................................................................................................................................344
Table Access Classes.......................................................................................................................................344
<TABLE>AccessGen Class .........................................................................................................................345
<TABLE>Access Class................................................................................................................................346
Virtual Record Classes......................................................................................................................................346
<COMPONENT>RecordGen Class.............................................................................................................347
<COMPONENT>Record Class....................................................................................................................348
Virtual Table Access Classes............................................................................................................................349
<COMPONENT>AccessGen Class.............................................................................................................349
<COMPONENT>Access Class....................................................................................................................350

Iron Speed Base Classes ................................................................................................................... 351


Page Class ........................................................................................................................................................352
BasePage class ...........................................................................................................................................352
User Interface Control Classes .........................................................................................................................359
Database Classes .............................................................................................................................................359
Record Classes............................................................................................................................................359
BaseRecord base class ...............................................................................................................................360
PhysicalRecord base class ..........................................................................................................................362
VirtualRecord base class .............................................................................................................................364
Utils Classes base class ..............................................................................................................................366
TableAccess base class ..............................................................................................................................366
PhysicalTableAccess base class.................................................................................................................367

z Page 9

VirtualTableAccess base class ....................................................................................................................369


Field Classes.....................................................................................................................................................370
Validator Classes ..............................................................................................................................................372
BaseIronSpeedValidator base class............................................................................................................374
BooleanValidator base class .......................................................................................................................375
CompareValidator base class ......................................................................................................................376
CountryValidator base class ........................................................................................................................377
CreditCardDateValidator base class............................................................................................................377
CreditCardNumberValidator base class ......................................................................................................378
CurrencyValidator base class ......................................................................................................................378
CustomValidator base class ........................................................................................................................379
DateTimeValidator base class .....................................................................................................................379
EmailValidator base class............................................................................................................................380
FieldValueValidator base class....................................................................................................................380
FileValidator base class ...............................................................................................................................381
ImageValidator base class...........................................................................................................................381
NumberValidator base class ........................................................................................................................382
PasswordValidator base class .....................................................................................................................382
PercentageValidator base class ..................................................................................................................383
RangeValidator base class ..........................................................................................................................383
RecordControlCustomValidator base class .................................................................................................384
RegularExpressionValidator base class ......................................................................................................385
RequiredFieldValidator base class ..............................................................................................................386
ShortDateValidator base class ....................................................................................................................387
URLValidator base class..............................................................................................................................387
UsaPhoneNumberValidator base class .......................................................................................................388
UsaStateValidator base class ......................................................................................................................388
UsaZipCodeValidator base class.................................................................................................................388
Filter Classes ....................................................................................................................................................389
BaseFilterControl base class .......................................................................................................................391
CategoryFilterControl base class.................................................................................................................391
DateFieldValueFilterControl base class.......................................................................................................392
FieldSortControl base class .........................................................................................................................393
FieldValueFilterControl base class ..............................................................................................................393
PagingControl base class ............................................................................................................................395
SearchTextControl base class .....................................................................................................................396

Transaction Management .................................................................................................................. 398


Transaction Model.............................................................................................................................................398
Generated SQL Statements..............................................................................................................................399
Binary Data Type Limitations for Microsoft SQL Server ..............................................................................399
Sql_variant Support in Microsoft SQL Server ..............................................................................................400
SQL Query Performance .............................................................................................................................400
Database Stored Procedures............................................................................................................................400
Transact-SQL Stored Procedures for Microsoft SQL Server.......................................................................402
Database Views ................................................................................................................................................407
Primary Key Use ...............................................................................................................................................408
Foreign Key Use ...............................................................................................................................................409
Concurrency Control .........................................................................................................................................411
Pessimistic Concurrency..............................................................................................................................413

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

Exception and Error Management .................................................................................................... 419


User Input Validation Errors ..............................................................................................................................419
Internal Errors ...................................................................................................................................................419
Database Exception Errors ...............................................................................................................................419
Application Logic Errors ....................................................................................................................................420
Event Logging ...................................................................................................................................................420

Application Security Management .................................................................................................... 421


User Authentication and Access Control for .NET............................................................................................421
Implementing Windows Authentication with .NET Impersonation ....................................................................423
Automatic Sign-Out ...........................................................................................................................................425
Data Transmission Encryption ..........................................................................................................................425
Active Directory and LDAP................................................................................................................................425
Password Storage.............................................................................................................................................426
Firewall Security................................................................................................................................................426
Handling SQL Injection Attacks ........................................................................................................................427
Other Security-Related Materials......................................................................................................................427

Scalability and Performance.............................................................................................................. 429


Session Management .......................................................................................................................................429
Running Applications on Multiple Servers ........................................................................................................429
Concurrent Users ..............................................................................................................................................430
Improving Application Performance ..................................................................................................................430

Web.config Configuration File........................................................................................................... 431


appSettings Element .........................................................................................................................................432
Run-Time Configuration Elements....................................................................................................................438
Switching Between .Net Framework 1.0 and 1.1 ..............................................................................................440

Compatibility Between Professional and Enterprise Editions ....................................................... 441

PART V: DEPLOYING APPLICATIONS ........................................................................... 443


Building Your Application.................................................................................................................. 445
Deploying Applications to a Production Server .............................................................................. 448
Copying Your Application to a Production Server.............................................................................................448
Copying Stored Procedures to a Production Server.........................................................................................449

z Page 11

Create a Virtual Directory for Your Application .................................................................................................449


Changing Database Connection Settings .........................................................................................................450
Adding Your Application to the Windows Registry............................................................................................451
Starting Your Session State Service.................................................................................................................451

Utility Programs .................................................................................................................................. 453


CompileApplication ...........................................................................................................................................453
LoadStoredProcedures .....................................................................................................................................454

Creating a Virtual Directory for Your Application............................................................................ 455


Configuring Database Authentication for Applications.................................................................. 462
Using Windows Authentication .........................................................................................................................462
Case 1: Microsoft SQL Server is installed on the local machine ................................................................463
Case 2: Microsoft SQL Server is installed on a remote machine ...............................................................464
Using Microsoft SQL Server Authentication......................................................................................................464

Troubleshooting Your Application.................................................................................................... 466


Application Wont Run.......................................................................................................................................466
A potentially dangerous Request.Form value was detected from the client ................................................468
Cannot update [tablename]. The data you entered conflicts........................................................................469
File or assembly name xxx.DLL, or one of its dependencies........................................................................470
HTTP Error 403 Forbidden. You are not authorized to view this page .....................................................470
Login failed for user 'NT AUTHORITY\NETWORK SERVICE' .........................................................................470
Potentially dangerous XML............................................................................................................................470
Time out ........................................................................................................................................................471
Unable to authenticate user...........................................................................................................................471
Unable to make the session state request ....................................................................................................472
Unrecognized attribute 'validateRequest' ......................................................................................................473

Configuring the Microsoft .NET Framework .................................................................................... 475


Verifying the .NET Framework was Installed after Microsoft IIS.......................................................................475
Verifying ASP.NET is Set Up Correctly.............................................................................................................476
Switching Between .NET Framework 1.0 and 1.1 ............................................................................................478

Working with Microsoft Visual Studio .NET ..................................................................................... 482


Visual Basic Project File....................................................................................................................................482
Iron Speed Designer Custom Controls .............................................................................................................482
Compiling Applications in Debug Mode ............................................................................................................483
Run-time Application Tracing ............................................................................................................................484
Using Microsoft Visual Design ..........................................................................................................................484
Source Code Control.........................................................................................................................................485

Iron Speed Personal Web Server ...................................................................................................... 487


Microsoft .NET Educational Resources............................................................................................ 489

z Page 12

PART VI: EXTENDING THE CODE GENERATOR ............................................................. 490


Building Reusable Panels and Components ................................................................................... 491
Building Independent Reusable Panels ............................................................................................................492
Adding a Reusable Panel to a Page .................................................................................................................492
Button Panels....................................................................................................................................................493
Navigation Menu Panels (Menu Tabs)..............................................................................................................496
Panels Requiring Record Information ...............................................................................................................501

Using Third-Party Controls................................................................................................................ 507


Independent Third-Party Controls.....................................................................................................................507
Integrating Third-Party Controls with the Database..........................................................................................510
Replacing Controls Generated by Iron Speed Designer...................................................................................515
Making API Calls to Your Application ...............................................................................................................517

Creating and Customizing Page Templates..................................................................................... 518


Whats in a Page Template? .............................................................................................................................523
Adding and Modifying Page Templates ............................................................................................................524
Record Page Templates ..............................................................................................................................526
Table Page Templates.................................................................................................................................531
Style Sheets ......................................................................................................................................................538
Placing ASP.NET Directives in Page Template Files .......................................................................................539

Generating Your Own Custom Code ................................................................................................540

PART VII: CODING EXAMPLES AND LAYOUT PAGE TUTORIALS..................................... 541


Tutorials and Examples Overview .................................................................................................... 544
Displaying Data................................................................................................................................... 545
Display a Record...............................................................................................................................................545
Display a Record with fields using checkboxes ................................................................................................547
Display a Record with fields using radio buttons ..............................................................................................549
Display a Record with fields using dropdown list ..............................................................................................552
Display images from a database.......................................................................................................................554
Display images based on URLs from a database.............................................................................................557

Adding and Editing Data .................................................................................................................... 560


Edit Record Page ..............................................................................................................................................560
Add Record Page..............................................................................................................................................563

Displaying Tables ............................................................................................................................... 567


Display a table of records..................................................................................................................................567
Display a table with search ...............................................................................................................................569

z Page 13

Display a table with a range filter ......................................................................................................................571


Display a table with sortable column headings .................................................................................................573
Display a table with page and grand totals .......................................................................................................576

Advanced Tables ................................................................................................................................ 579


Display a table with alternating rows.................................................................................................................579
Display a table with different alternating rows...................................................................................................581
Display a table with multiple fields within a column ..........................................................................................583
Display a table with multiple fields within a sortable column ............................................................................585
Display a Table within a Table ..........................................................................................................................587

Master Detail Pages............................................................................................................................ 594


Display a master-detail page.............................................................................................................................594

Advanced Pages ................................................................................................................................. 597


Display Record with Search for a Record .........................................................................................................597
Display Record with Search and Pagination.....................................................................................................599

Dashboard Pages ............................................................................................................................... 603


Dashboard Page ...............................................................................................................................................603
Dashboard Page with Advanced Queries .........................................................................................................606

Advanced Page Features ................................................................................................................... 612


Changing a Dialog Title.....................................................................................................................................612
Changing Page Titles........................................................................................................................................613
Keeping a Page On-Screen After Clicking Save ............................................................................................614
Adding Multiple Menus to a Page .....................................................................................................................615
Creating a Large List Selector...........................................................................................................................617
Using a Large List Selector ...............................................................................................................................619
Moving the Sign-in Control to Another Directory...............................................................................................622

User Interface Coding Examples....................................................................................................... 624


Adding Custom Data Validation Code ..............................................................................................................624
Customizing the Default Error Message ......................................................................................................624
Customizing Data Validation Logic ..............................................................................................................626
Validating a Field Value Immediately After Entering Text ...........................................................................628
Disabling Concurrency Validation for a Single Page ...................................................................................629
Pre-Setting Field Values ...................................................................................................................................629
Setting One Field Value when Another Field is Selected ............................................................................630
Pre-Selecting Field Values Based on Logged-In User ................................................................................631
Pre-Setting Field Values of New Records ...................................................................................................632
Customizing the Sort Order of Field Value Items ........................................................................................636
Conditionally Displaying Components ..............................................................................................................636
Conditionally Hiding User Interface Controls ...............................................................................................637
Conditionally Displaying Components by Search Result.............................................................................639
Conditionally Displaying Tables by Search Result ......................................................................................641
Conditionally Displaying Table Columns .....................................................................................................642
Conditionally Formatting Table Text Colors.................................................................................................643

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

Adding, Filtering and Sorting Data ................................................................................................... 651


Programmatically Accessing Database Records ..............................................................................................651
Adding New Records ...................................................................................................................................651
Updating Existing Records...........................................................................................................................653
Updating Existing Records from a Windows Application.............................................................................654
Creating Custom Table Columns.................................................................................................................656
Calling Your Own Database Stored Procedures .........................................................................................658
Creating a DataTable Object to use with Third-Party Controls....................................................................661
Filtering Data.....................................................................................................................................................662
Customizing Table Component Filtering......................................................................................................662
Accessing Records with Filtered Queries ....................................................................................................665
Application-Wide Middle-Tier Filtering .........................................................................................................667
Filtering Dropdown List Box Content ...........................................................................................................669
Filtering a Show Table Page using a Field Not in the Table........................................................................673
Filtering in the Database Tier vs. Middle Tier ..............................................................................................678
Sorting Data ......................................................................................................................................................679
Paging and Sorting in the Database Tier vs. Middle Tier ............................................................................679
Setting the Sort Order for a Table Component ............................................................................................679
Customizing the Sort Order of Table Components......................................................................................680
Audit Trails and Use Tracking ...........................................................................................................................682
Adding an Audit Trail....................................................................................................................................682

Security and Authentication Coding Examples............................................................................... 685


Customizing Sign In and Sign Out Page Appearance ......................................................................................685
Customizing Page Security Enforcement .........................................................................................................685
Customizing Application Authentication Behavior ............................................................................................686
Implementing Integrated Windows Authentication (Single Sign In) ..................................................................686
Storing Extra Information at Sign-In Time.........................................................................................................691

Third-Party Integration Coding Examples........................................................................................ 693


Generating Crystal Reports Documents ...........................................................................................................693
Using Microsofts Calendar Control to Pick Dates ............................................................................................700
Using External DLLs in Applications ................................................................................................................703
Sending Email from an Application ...................................................................................................................704
Making Your Application a Web Service...........................................................................................................705
Calling an External Web Service from a Data Access Class............................................................................708

PART VIII: REFERENCE .............................................................................................. 712


Table and Properties Files ................................................................................................................. 714
Properties Files .................................................................................................................................................715

Properties Files................................................................................................................................... 718

z Page 15

Copying Properties Files ...................................................................................................................................718


Handling Errors in Properties Files ...................................................................................................................719
Basic XML Syntax and Vocabulary...................................................................................................................720
Prologue ............................................................................................................................................................721
XML Declaration Element ............................................................................................................................721
ComponentDefinition Element ..........................................................................................................................722
Self Element......................................................................................................................................................724
ComposedOf Element.......................................................................................................................................725
EventBindings Element .....................................................................................................................................726
Event Element...................................................................................................................................................727
ContainedComponent Element.........................................................................................................................727
Button Element ............................................................................................................................................732
CategoryFilter Element ................................................................................................................................733
FieldFilter Element .......................................................................................................................................735
FieldSort Element ........................................................................................................................................736
FieldStatistic Element ..................................................................................................................................737
FieldValue Element......................................................................................................................................738
Footer Element ............................................................................................................................................749
Header Element ...........................................................................................................................................750
Html Element ...............................................................................................................................................750
HyperLink Element.......................................................................................................................................751
Image Element.............................................................................................................................................751
ImageButton Element ..................................................................................................................................752
LinkButton Element......................................................................................................................................753
Label Element ..............................................................................................................................................755
Literal Element .............................................................................................................................................755
Menu Element..............................................................................................................................................756
Pagination Element......................................................................................................................................756
PagingControl Element ................................................................................................................................757
PushButton Element ....................................................................................................................................757
Record Element ...........................................................................................................................................759
SearchFilter Element ...................................................................................................................................760
Selection Element ........................................................................................................................................761
Table Element..............................................................................................................................................761
TableStatistic Element .................................................................................................................................762
Text Element................................................................................................................................................763
UserControl Element....................................................................................................................................763

nDoc and VBDoc License Agreement .............................................................................................. 765

z Page 16

PART I: GETTING STARTED

PART I: GETTING STARTED ............................................................................................ 1

Introducing Iron Speed Designer......................................................................................................... 2


A Quick Tour of Iron Speed Designer................................................................................................... 6
Creating Your First Application........................................................................................................... 10
Creating Web Pages with the Application Builder ..............................................................................................12
Step 1: Name Your Application ...........................................................................................................................14
Step 2: Select a Web Page Style........................................................................................................................16
Step 3: Connect to a Database Server ...............................................................................................................17
Step 4: Select Database Tables .........................................................................................................................19
Step 5: Configure Web Pages ............................................................................................................................22
Step 6: Create a Navigation Menu......................................................................................................................27
Step 7: Select a Start Page.................................................................................................................................28
Step 8: Build Your Application.............................................................................................................................29

Building and Running Your First Application.................................................................................... 31


Building an Application........................................................................................................................................32
Running Your Application....................................................................................................................................33

17

INTRODUCING IRON SPEED DESIGNER


With limited resources and little budget to hire consultants, IT departments must deploy staff in the best way possible.
Many programming tasks, such as writing routine SQL statements and coding web pages are typically done in a brute
force manner. The last thing you want is to work on low-level, time-intensive, hand-coding tasks.
Another solution needs to be found, and that solution is Iron Speed Designer. Iron Speed Designer can jump-start
your development process by generating a significant amount of your application for you. The code produced is
consistent and can replicate a look-and-feel automatically throughout your applications user interface. You can create
complex screens or web pages with database-connected components, including forms, reports, filters, and navigation
features.
Iron Speed Designer is a tool for rapidly developing Microsoft .NET web applications that:
1. Starts from scratch with your application-specific data model.
2. Creates everything needed for a functional application, links everything together, and delivers a bug-free,
executable application.
3. Automatically generates source code that is native to your target platform or environment.
4. Provides complete and well-organized source code thats easy to modify.
5. Preserves modifications/customizations during subsequent application regenerations.
Iron Speed Designer is founded in the time-tested rapid application development (RAD) practices you are probably
familiar with, but because it generates so much of the basic code, you get more functionality at a faster rate. It
produces standard three-tiered web applications, including the user interface pages and user interface code, SQL
queries and transaction management code. Using Iron Speed Designer, a custom, working application not just a
prototype or individual components is built in just a few hours. Modifications and enhancements to the user interface
are quickly incorporated with each re-generation of the code.

z Page 18

Build native .NET applications like


these with the standard 3-tier
architecture preferred by most
corporate developers.

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 builds a


complete three-tier application.

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

A QUICK TOUR OF IRON SPEED DESIGNER


When starting Iron Speed Designer for the first time, the Start screen will be displayed. As you can see, Iron Speed
Designer has a friendly, easy-to-navigate user interface.
The Start Tab
Use the Start tab as a jumping-off point to guide your create new applications and edit existing ones.
The Start tab can get
you going quickly. Just
click Create a New
Application to create
your first application.

The Application Builder Tab


Use the Application Builder to guide you through the process of creating and modifying applications.

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.

View generated source code files

Add or remove web pages from your project

The Database group shows the database tables, views and named queries available to your application for each
selected database.

See which tables are available to your application

View database table schemas and foreign key relationships

Set various default data display and field validation properties

z Page 24

The Generated Documentation group lists the documentation files generated by Iron Speed Designer.

View generated documentation files

z Page 25

CREATING YOUR FIRST APPLICATION


Command: File, New, Application
After starting Iron Speed Designer, you may proceed with creating a new application or editing an existing application.
The easiest way to get started with Iron Speed Designer is to use the Application Builder to create your application.

Use the Application Builder to create new applications.


The Application Builder in Iron Speed Designer initializes your new application and walks you through the process of:
1. Selecting database tables to use in your application. The Application Builder connects to a designated
database and uses the table schemas of selected tables when generating your application.

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:

Creating Web Pages with the Application Builder

Step 1: Name Your Application

Step 2: Select a Web Page Style

Step 3: Connect to a Database Server

Step 4: Select Database Tables

Step 5: Configure Web Pages

Step 6: Create a Navigation Menu

Step 7: Select a Start Page

Step 8: Build Your Application

z Page 27

Creating Web Pages with the Application Builder


Perhaps the most intimidating aspect of building databound web-based applications is the number of HTML pages and
forms needed for users to create, retrieve, update, and delete records in the relevant database tables.
While all of these pages are necessary (theyre the heart of most usage), the work to produce them is probably the
most boring. Theres not much difference between one form and the next, and each form, on its own, is rarely
interesting. The volume of pages that need to be created and the mundane nature of the task combine to mute the
enthusiasm of even the most gung-ho developer. Perhaps this is why developers use the derogatory term CRUD
(Create/Retrieve/Update/Delete) to describe these pages.
As you might have guessed, Iron Speed Designer can largely eliminate such mind-numbing work. Beyond this, Iron
Speed Designer can also assist in enforcing corporate standards. Once the appropriate templates have been set up,
every application that utilizes these templates automatically incorporates any features included in the template.
Iron Speed Designer automates the production of repetitive pages through the use of layout and template pages.
Several standard layouts and templates in a variety of design themes are included with the product. You can either
adopt of these standard designs, or create your own.
Pre-Defined Page Types
Using the Application Builder in Iron Speed Designer, you can create a separate set of web pages for each table in
your application using built-in templates. These pages either feature a tabular data display or individual record display
for the data in the underlying database table, giving you standard Show Table, Add Record, Edit Record, and Show
Record pages for any database table, database view, or named query in your application. Youll find these pages
provide a useful running start in your overall application and can be further modified at the HTML level as well. After
using the Application Builder to create web pages, you can further customize these web pages with your HTML editor.
Show Table pages. Show Table
pages function as reports in
applications generated by Iron Speed
Designer. Unlike traditional reports,
which are static in nature, Show Table
pages are highly interactive, allowing
customization by application users.
Show Table pages go far beyond typical
web-based reports, because they can
be easily made highly interactive,
allowing application users to add, edit,
and delete data as well as view data.

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.

Add and Edit Record pages. Add


Record and Edit Record pages can be
created for entering and editing record
data. These pages can be configured
as to which table fields are displayed,
how they are ordered on the page, and
whether an application user can enter
values into the fields.

z Page 29

Delete Record Function


By default, Iron Speed Designer generates a Delete record button for each Show Table page. A button for this
operation appears above the table in the Show Table page. Corresponding buttons for these web pages are placed on
the Show Table page.
Delete buttons are automatically generated for Show
Table pages.
Export Table Wizard
By default, Iron Speed Designer creates an Export Table wizard web page for each Show Table page. A
corresponding Export button is placed on the Show Table page.
Files exported by the Export wizard are saved in ASCII comma separated value (CSV) format, one data record per file
row. Only the rows in the currently selected data set are exported. This is convenient for end-users who perform a
search using the Search control and wish to export only the data subset that matches the search.

Data exported by the Export wizard.


The exported data includes column headings in the first row of the data. This makes it easy for other application
programs to import the data. For the most part, the exported rows include all data fields from the database record,
even if they are not visible in the table, with several caveats:

Password fields are not exported.

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.

Step 1: Name Your Application

z Page 30

Use the Application Builder to create new applications.


The first step in creating a new application is to give it a name and a directory location for its files. Additionally, several
advanced settings are available, allowing you to select the culture for your application, which determines the various
localization feature settings.
Field

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 prefix for the generated database stored procedures.

A tag prefix (i.e. namespace) for server controls tags in the generated ASPX
and ASCX files.

Please note that if you pick any of these application names:

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.

Step 2: Select a Web Page Style

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

Design theme (page style)

The page layout style for your initially created web pages.

Step 3: Connect to a Database Server

z Page 33

Connect to your database server machine.


To display and edit data in your application, Iron Speed Designer needs to connect to your database server. The user
name and password information is used by:

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.)

Your application to display and edit data.

Field

Description

Microsoft SQL Server

The name of the database server machine. (Note: this is not the name of
the database.) The database server machine name can be:

The server name, e.g., DEMO or SQL.IRONSPEED.COM.

An IP address, e.g., 206.154.12.22. Do not include the http:// or


https:// prefix in the IP address.

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.

Use a specific Microsoft


SQL Server user name
and password

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.

Database user name

The login user name required to access the selected database server
machine.

Database password

The login password required to access the selected database server


machine.

Step 4: Select Database Tables

z Page 35

Select one or more database tables to create web pages.


Iron Speed Designer provides a variety of built-in page templates that will automatically create web pages for the
database tables and views you select to use in your application. Automatically creating web pages based on your
database accelerates your application development by giving you standard Show Table, Add Record, Edit Record, and
Show Record pages for any database table, database view, or named query in your application. After creating an
initial set of web pages, you can further customize them with your HTML editor.
Using Iron Speed Designer, you can use any number of database tables to your application from any number of
databases on the same or different database server machines. (Enterprise Edition only.) There is no practical limit on
the number of tables you can use or reference in your application.
After identifying to Iron Speed Designer the specific database tables you wish to use in your application, Iron Speed
Designer queries the designated database and collects the selected tables schemas as well as related foreign key
relationship information. Specifically, Iron Speed Designer uses the table schemas in order to generate the
appropriate SQL queries and database access code. Similarly, the foreign key information is used when generating
multi-table joins and other similar SQL queries. However, the database table information alone is not sufficient to
generate database-connected applications. Iron Speed Designer combines the database table information with
component information (see Setting Code Generation Tag Properties later in this Guide) when generating your
application.

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.

Database name restrictions


Iron Speed Designer is not currently able to connect to databases whose database names have these restricted
characteristics:

The # character is not supported in database names.

Database table name restrictions


Due to limitations in Microsoft Windows, Iron Speed Designer is not able to use or reference database tables with
these names:
AUX
CLOCK$
COM1 COM9
CON
LPT1 LPT9
NUL
PRN

Other table name restrictions include:

Table names may not exceed 50 characters in length.

Most special characters are not supported. Only the space and underscore are supported.

Database Field Name Restrictions


Iron Speed Designer must generate SQL statements that conform to the underlying database, such as Microsoft SQL
Server. Accordingly, there are several restrictions as to table names and field names used in the underlying database.

z Page 37

For Microsoft SQL Server databases, table field names may contain:

Letters as defined in the Unicode Standard 2.0.

Decimal numbers from either Basic Latin or other national scripts.

The at sign (@) sign, dollar sign ($), number sign (#), or underscore (_).

Field names may not contain:

A Transact-SQL reserved word. Microsoft SQL Server reserves both the uppercase and lowercase versions
of reserved words.

These special characters: comma, single quote, and double quote.

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.

Step 5: Configure Web Pages

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

This option sets the display justification in a table column.

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

This option, if enabled, places a categorization control on the page.

Searchable

This option, if enabled, places a search control on the page and indicates which database
table fields participate in the search.

Filter

This option, if enabled, ads various filter controls to the page.

z Page 42

Configuring Column Totals

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.

Configuring Master-Detail (Parent-Child) Pages

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

Step 6: Create a Navigation Menu


Configure your application's navigation menu.

Quickly add and configure navigation menu items for your application.

Field

Description

Menu Name

The name to use for the particular page or selection.

URL

The page file displayed when the menu item is selected (clicked).

Step 7: Select a Start Page

z Page 45

Select and preview your applications start page.


Select your applications start page.

Step 8: Build Your Application

z Page 46

Youre just one click away from viewing your application.


Iron Speed Designer builds a complete three-tier web-based application, including presentation layer, application layer,
and database layer. When you click Finish, Iron Speed Designer performs these actions:

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.

Compiles and links your application.

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

BUILDING AND RUNNING YOUR FIRST APPLICATION


Generating your application in Iron Speed Designer is always just one button click away. The Build button is visible on
nearly every screen in Iron Speed Designer, allowing you to iteratively modify parts of your application and quickly
regenerate it to see the changes.
During the application building process, a variety of application components are generated for your application,
including:

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.

Database access code, consisting of a set of Visual Basic classes.

SQL queries implemented as a set of database stored procedures.

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.

The Application Files folder in Iron Speed Designer.


This chapter contains information about:

Building an Application

Running Your 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.

If you run your application from within Iron Speed


Designer, you may see the screen at the right.
This is sent by the Microsoft IIS when your page or
one of its components is being compiled in the
background.
3.

Click here to go to your application.

4.

If the application pages appear garbled or


incomplete, click Ctrl-F5. This clears your
browsers cache memory, which frequently can
cause an application to appear incomplete
after it is built.

Application Building Options

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:

You manually modified or deleted any of an applications ASPX, ASCX, or


Visual Basic files (but not the layout page and properties files) and you
want to recreate them.

You manually added or deleted a components properties file in an


applications folder.

Note that the "safe" Visual Basic classes will never be overwritten, even when you
"Build All and Run".
Run Application

This command runs an application.

Running Your Application


Command: Build, Run
After generating your application, it is ready to run. Like any web-based application, you access it by clicking on a
URL. Each application you develop will have its own separate URL, so you can distribute those URLs only to those
end-users who need access. Your applications URL is provided to you on the Output message box after your
application has been built.
In general, your applications URL has the form:
http://YourWebServerName/<Application Folder>
where

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

PART II: CUSTOMIZING YOUR APPLICATION

PART II: CUSTOMIZING YOUR APPLICATION .................................................................... 1


Setting the Start Page and Error Pages................................................................................................ 3
Setting Default Field Display and Data Validation............................................................................... 5
Field Display Options ............................................................................................................................................8
Field Validation Types......................................................................................................................................9
User-Defined Database Field Types..............................................................................................................11
Primary and Foreign Key Options.......................................................................................................................11
Adding Virtual Primary Key Relationships .....................................................................................................12
Adding Virtual Foreign Key Relationships .....................................................................................................12
Data Conversion Options ....................................................................................................................................15
Display Format Options .................................................................................................................................16
Storage Format Options.................................................................................................................................19
Enumerated Value Field Constraints .............................................................................................................20
Adding Not-Null Field Constraints..................................................................................................................21

Adding a Custom Named Query.......................................................................................................... 22


Incorporating Database Changes ....................................................................................................... 25
Updating Database Schemas for Your Application.............................................................................................25
Deleting Tables from Your Database..................................................................................................................26

Securing Web Pages with Role-Based Security ................................................................................ 27


Role-Based Security Overview ...........................................................................................................................27
Step 1: Enable Role-Based Security..................................................................................................................31
Step 2: Select Roles Table.................................................................................................................................33
Step 3: Configure Sign-In and Sign Out Pages .................................................................................................36
Step 4: Configure Web Pages for Role-Based Security ....................................................................................37
Administering Your Application ...........................................................................................................................39

Localizing (Internationalizing) Your Application ...............................................................................41


Culture Encoding.................................................................................................................................................42
Page Encoding....................................................................................................................................................44
Character Sets ....................................................................................................................................................45
Currency Formatting and Validation ...................................................................................................................45
Date Formatting and Validation ..........................................................................................................................46
Error and Validation Message Strings ................................................................................................................46
Enabling Language Support in Microsoft Windows ............................................................................................50
United States Phone Numbers, States and ZIP Codes ......................................................................................51

Configuring Iron Speed Designer Options......................................................................................... 52

52

Configuring the Application Builder.....................................................................................................................52


Configuring Build Options ...................................................................................................................................54

z Page 53

SETTING THE START PAGE AND ERROR PAGES


Command: Tools, Configure Start Page
You can quickly put a few finishing touches on your application by setting its start page, error page, and related pages.
You can configure several
special application pages,
including the start page and
error page.

Configure Start Page Options

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

This page is displayed if another page encounters certain application errors.


This page is displayed if the web server encounters HTTP errors. (See \<Application
Folder>\Web.config for a list of errors which result in this page being displayed.)
This is a completely self-contained error page. Each applications Web.config file is set
to return this page to a client if the client's HTTP request could not be served
successfully. This is to avoid the 'yellow screen' if an application doesnt build or compile
properly, or a non-existent page is requested, etc.

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

These files implement the Sign In page.

Sign out page

These files implement the Signed Out Confirmation page.

z Page 55

SETTING DEFAULT FIELD DISPLAY AND DATA VALIDATION


Location: Application Explorer, Databases folder
In most real-world databound web-based applications, a significant portion of an applications actual usage involves
data entry and maintenance by users. Because users always make mistakes, developers have grown accustomed to
using strongly typed data objects and associated validation logic to help ensure data integrity.
While such an approach is mandated by design sense and best practices, time and budget pressures can cause
developers to cut corners. In such scenarios, developers can be intimidated by the massive prospect of adding typechecking and data validation logic to hundreds, if not thousands, of HTML-forms.
Still, when shortcuts are taken and applications go into production without the appropriate data validation logic in
place, the results can be disastrous. Over time, once-valuable data assets can be corrupted with data thats riddled
with mistakes, typos, and errors. The costs associated with cleaning up this data can outweigh the value of the data
itself.
To give developers an easy solution to this problem, Iron Speed Designer generates applications with strongly typed
data access objects. The generated code takes advantage of the data types specified in the database to generate
specific access functions that are strongly typed. Moreover, applications built using Iron Speed Designer can use a
variety of built-in data field validation types and their corresponding data input validation. Developers can specify
these advanced field validation types in Iron Speed Designer, and the generated code will use this type when
generating the database access code.

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

Indicates whether the field is indexed in the database.

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

Indicates whether the field is computed in the database. If a field is computed, it


cannot be changed by an application built with Iron Speed Designer.

Settable Table Properties


Option

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.

Settable Field Properties


Many properties are configurable for individual database fields. The remainder of this section contains information
about:

Field Display Options

Field Validation Types

User-Defined Database Field Types

Primary and Foreign Key Options

Adding Virtual Foreign Key Relationships

Data Conversion Options

Display Format Options

z Page 58

Storage Format Options

Enumerated Value Field Constraints

Adding Not-Null Field Constraints

Field Display Options


Use the General section to globally
set field properties, including
display name, display width, default
value, and foreign key value
display.

The following field display options are available.


Option

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.

Text box columns

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.

Field Validation Types


Iron Speed Designer takes advantage of the data types specified in the database to generate specific access functions
that are strongly typed. Moreover, applications built using Iron Speed Designer can use a variety of built-in data field
validation types and their corresponding data input validation. You can specify one of these advanced field validation
types in Iron Speed Designer, and the generated code will use this type when generating the database access code.

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

A checkbox is displayed as either checked or unchecked, depending on the field


value (0 or 1).

Country

The list of countries in the world.

Credit Card Exp. Date

The credit card expiration date is displayed in the format MM/YYYY.

Credit Card Number

Credit card numbers can be 12, 13, or 16 digits in length.

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

Dates display date and time based on the format selected.

Decimal Number

A decimal, floating-point number is displayed based on the format selected. The


Decimal Number type always displays a fixed number of digits behind the
decimal point.

Email Address

Email addresses are displayed in the format of [email protected]. (TLD is


top-level domain.) Similarly, email addresses input are validated in this format.

File

File is a file name in standard Windows format.

Floating Point Number

A floating-point number is displayed. The Floating Point Number type displays a


variable number of digits behind the decimal point.

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.

A fully instantiated URL when the image is resident on another server


(e.g., http://www.ironspeed.com/art/logo.gif).

Number
(integer number)

An integer number is displayed based on the format selected.

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

Percentages range from 0.00% to 100.00%. Two digits of precision are


displayed.

String

String fields can contain any alphanumeric character.

U.S. Phone Number

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

The 50 states of the United States either in abbreviation or full-text form.

U.S. ZIP Code

ZIP codes can be 5 digits or 9 digits. 9 digit ZIP codes are hyphenated.

URL

URLs are displayed as clickable links to any valid web address.

Very Large String

Very Large String fields can contain any alphanumeric character. These fields
are generally used for CLOBs (character large objects).

User-Defined Database Field Types


Microsoft SQL Server has a feature called user-defined field types. User-defined data types are basically aliases for
the underlying Microsoft SQL Server data types. Iron Speed Designer treats these user-defined field types as the
underlying Microsoft SQL Server data types. For example, a user-defined data type called BriansBigInt is really just an
alias for the underlying bigint data type. When Iron Speed Designer queries the Microsoft SQL Server to read the
table schema, Iron Speed Designer sees only the true underlying Microsoft SQL Server data types. That is, Iron
Speed Designer only sees "bigint", not "BriansBigInt". Accordingly, this allows Iron Speed Designer to properly handle
user-defined field types.

Primary and Foreign Key Options


Use the Keys section to globally set field
properties, including foreign key
relationships and to define new foreign
key relationships.

The following primary key and foreign key options are available.
Option

Description

Display foreign key as

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

Virtual foreign key

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.

Virtual primary key

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.

Adding Virtual Primary Key Relationships


For database tables that do not have explicit primary keys, you can specify the primary key relationships in Iron Speed
Designer, allowing you to create Add Record, Edit Record and Show Record pages for these tables. You dont have to
change your database schema in order to generate full-featured applications. (Enterprise Edition only.)
Virtual primary keys provide all of the benefits of a real primary key (that is explicitly declared within the database) to a
database table, database view, and named query, including:

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.

Make many code customizations involving the table easier.

Allow the "ID" Redirect Argument to be used with the table.

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

Adding Virtual Foreign Key Relationships


Iron Speed Designer recognizes the foreign key relationships in your database schema and uses them to construct
multi-table joins in SQL. Foreign key relationships specify how tables relate to each other and indicate one-to-many
relationships between tables. For example, your application is able to display Customer and Order Detail information
within the Order page using these SQL table joins.
Explicit foreign keys. If your database contains explicit foreign key relationships, Iron Speed Designer automatically
uses them when generating your application's SQL.
Virtual foreign keys. You can also inform Iron Speed Designer of implicit foreign key relationships between your
database tables that may not be defined in the database. Iron Speed Designer does the rest, generating appropriate
application logic and SQL queries. (Virtual foreign key support is available in Iron Speed Designer Enterprise Edition
only.)
Even though the parent tag is bound to the one table,
you can display data from other tables via foreign key
references.
In this example, the parent tag is bound to the Orders
table. The page displays FieldValue tags bound to the
Customers table by using the foreign key relationship
between Orders.Customer and the Customers table.

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

Add virtual foreign keys to


supplement foreign key
relationships already defined in
your database.

z Page 65

Field

Action

Table name

The database table to which the virtual foreign key points.

Field name

The database field to which the virtual foreign key points.

Foreign key name

The name of the virtual foreign key.

Using Foreign Keys with Database Views and Named Queries


You can create a virtual foreign key for a database view or query as long as the database view or query also has a
virtual primary key. (See Adding Virtual Primary Key Relationships for details on virtual primary keys.) Since database
views and named queries themselves are not actual physical tables, you cannot create a foreign key relationship
between a database table and a database view or named query. However, using Iron Speed Designer, you can create
a virtual foreign key relationship between a database table and a database view or named query as long as the
database view or named query has a virtual primary key. This virtual primary key provides Iron Speed Designer the
information necessary to build applications that can edit, view and delete individual records from the database view or
named query.

Data Conversion Options


Use the Data Conversion section to
globally set field properties, including
default values, display formats, and string
conversion.

The following data conversion options are available.


Option

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

Optional. Specifies whether a string trimming processing function is performed on data


entered into the field when new records are created or existing records are updated.
Yes

Leading and trailing spaces are removed from the string.

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

No conversion is applied to the text string.

All Lowercase

The text string is converted to all lowercase. Leading and trailing


spaces are removed.

All Uppercase

The text string is converted to all uppercase.

Capitalize All Words

Every word in the string is capitalized.

Specifies any special database constraints (SQL) that will be executed at the time the record
is inserted into the database.
For more information, see:

Enumerated Value Field Constraints

Adding Not-Null Field Constraints

Display Format Options


Display format options specify a fields display format, typically for numbers and dates.
Field Type

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.

Credit Card Expiration Date


Date

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.

Standard Date and Time Format Strings

Option

Examples

Short date pattern.


Example for culture en-US: 4/10/2001
Example for culture en-GB: 10/04/2001

Long date pattern.


Example for culture en-US: Tuesday, April 10, 2001.
Example for culture en-GB: 04 October 2001

Full date and time pattern.


Example for culture en-US: Tuesday, April 10, 2001 3:51 PM.
Example for culture fr-FR: mardi 10 avril 2001 15:51

Custom Date and Time Format Strings

Option

Examples

dd/MM/yy

04/10/2001

dddd, MMMM dd yyyy

Tuesday, April 10 2001

Standard Numeric Format Strings


For the validation types Number, Currency, and Percentage, a few examples of .NET Numeric format strings are:

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

Percent. The number is converted to a string that represents a percent.


Example for value .126 and culture en-US: 12.60 %

Custom Numeric Format Strings

Option

Examples

#,#

Example for value 1234567890: 1,234,567,890

[##-##-##]

Example for value 123456: [12-34-56]

00.00

Example for value 1.2: 01.20

' ' ##.###.###,00

Example for value 12345678: 12.345.678,00

US State Format Strings


The following format strings used by Iron Speed Designer are not defined by the .NET framework, but are meant to be
similar to other .NET format strings.

z Page 70

Option

Examples

Long state names.


Examples: "California", "Washington".

Short state names.


Examples: CA, WA.

Storage Format Options


Optional. Storage format options specify a fields storage format, typically for numbers and dates.
Field Type

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"

Credit Card Expiration Date


Currency
Date
Decimal Number
Number
Percentage

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.

Enumerated Value Field Constraints


Enumerated values are derived from the Constraints and Formats specified on the Database page in Iron Speed
Designer. These constraints usually instruct Iron Speed Designer to build a dropdown list of these values wherever
the constrained fields are used in an input form, such as on an Add Record or Edit Record page.
Field Type

Action

Numeric fields:

A database constraint can be specified on the Database page in Iron Speed


Designer. The constraint must be specified as a list of comma-separated values.

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

A database constraint can be specified on the Database page in Iron Speed


Designer. The constraint must be specified as a list of comma-separated values
enclosed in single quotes.
Example:
Constraint: 'blue' , 'green' , 'yellow' , 'black'
If a single quote needs to be specified, it should be quoted twice. For example:
Constraint: 'fred''s shirt' , 'alan''s shirt' , 'harry''s shirt'
If a constraint is specified, Iron Speed Designer automatically creates a dropdown
menu for this field on the Add Record and Edit Record pages.
For Boolean fields, the values T and F are stored in the database field.
Constraints cannot be specified for Boolean fields. A Format can be specified
with two values to use for T and F. The first value corresponds to True and the
second value to False. For example:
Format: True, False

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:

Enumerated values are not currently supported for Date fields.

Credit Card Exp. Date


Date

Adding Not-Null Field Constraints


Not Null constraints cannot be set or enforced through Iron Speed Designer. To make sure the field is required at the
database level, you will need to make changes to the schema at the database level. However, you can make fields
mandatory on forms, meaning an application user must provide a value in order for the record to be inserted into the
database. (See Setting Code Generation Tag Properties later in this Guide.) You can also provide default field values
by entering a Default Value (see Data Conversion Options).

z Page 73

ADDING A CUSTOM NAMED QUERY


Command: Project, New Query
You can create a custom, or named query that can be reused by multiple pages. This saves you time since you dont
have to recreate the same query for each separate use. The concept of a named query is very similar to the concept
of a database view, except that the named query is defined in Iron Speed Designer and not in the underlying
database to which you may not have access.

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.

Selecting fields for a named query.


Each defined query generates an appropriate Record and TableAccess set of classes for the queries. These classes
will be derived from the VirtualRecord and VirtualTableAccess base classes. The benefit of having queries is that
there will be fewer generated classes related to the virtual tables and more importantly, their names correspond to
the name you provide, making them more understandable.
When a query is used as a data source for a code generation tag, editing of the data is not permitted. No editing is
allowed regardless of the number of levels below a query. For example, if a query was used for a Table, and a record
is embedded within another record in the table row, no editing is allowed for either of the records because they were
derived from a query.

z Page 75

Table Name Aliases


When creating queries it is sometimes necessary to join a table with itself. For example, the Northwind.Employees
table has a ReportsTo field that is a foreign key to the Employees table (i.e. it references another Employee).
Suppose you wanted to create a query that shows an employee's first and last name as well as the first and last name
of the person they report to. In SQL your query would look something like the following:
SELECT Employees.FirstName, Employees.LastName, EmployeesReportsTo.FirstName, EmployeesReportsTo.LastName
FROM Employees, Employees EmployeesReportsTo
WHERE Employees.ReportsTo = EmployeesReportsTo.EmployeeID

"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:

They may not include asterisks, question marks, or dashes.

They may not start with a digit.

They may not end with a period (no trailing period).

Query names may not be any of the following:


AUX
CLOCK$
COM1
COM2
COM3
COM4
CON
LPT1
LPT2
LPT3
NUL
PRN
TABLE

z Page 76

INCORPORATING DATABASE CHANGES


This chapter includes information about:

Updating Database Schemas for Your Application

Deleting Tables from Your Database

Updating Database Schemas for Your Application


Command: Project, Database Schema, Scan All Tables for Changes
When you change the underlying database tables upon which your application is built, you need to inform Iron Speed
Designer of these changes so that Iron Speed Designer generates code matched to your updated table schemas. You
can do this using Iron Speed Designers refresh feature. Refreshing your database tables allows Iron Speed Designer
to rebuild your application using the updated database tables.
The table below shows the database modifications that require refreshing database schemas to your application.
Adding
Table

Renaming / Changing

Deleting

Primary key

Table fields

Table field type

Table field size

Default field value

Foreign key relationship

Refreshing a database schema to your application


1.

Select Project, Database Schema, Scan All Tables for Changes

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.

Deleting Tables from Your Database


Because Iron Speed Designer is not a database schema-editing tool, you cannot add, edit or delete database tables in
Iron Speed Designer.

z Page 78

SECURING WEB PAGES WITH ROLE-BASED SECURITY


This chapter describes the role-based security mechanism generated by Iron Speed Designer. With role-based
security, you can:

Define user names and passwords.

Create and assign multiple user roles for your users.

Configure each web page for access by designated user roles.

Generate your applications entire role-based security infrastructure.

This section contains information about:

Role-Based Security Overview

Step 1: Enable Role-Based Security

Step 2: Select Roles Table

Step 3: Configure Sign-In and Sign Out Page

Step 4: Configure Web Pages for Role-Based Security

Administering Your Application

Role-Based Security Overview


Most applications serve a variety of constituents customers, customer service, marketing, sales, and management,
to name a few. Its increasingly common in contemporary web applications to permit much broader access to
applications and their underlying data than was common with client server applications, which had more restricted user
bases. With broader use comes an increased need to partition data according to the user type and sometimes down
to the individual user as well.
One of the most convenient security mechanisms is role-based security because it allows individual users to be
assigned into roles, and then access granted at the role level. This makes for convenient administration because most
applications need just a handful of roles 5 or 10 at most but may have thousands of users.
Broadly speaking, Iron Speed Designer generates three types of role-based security:
1. Simple sign-in authentication. Application users must sign into the application. Only users with user names
and passwords can sign in, giving you control over who can access your application.

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.

Step 2: Specify page-specific access rights using the Properties dialog.

z Page 80

Step 3: Define sign-in and sign-out pages.


Step 4: Build your application.
Single role authentication
Single role authentication distinguishes between various groups of users based on their assigned role. Individual
application pages can be configured to permit access to users who have the required role. In the single role
authentication model, individual application users have only one role assigned to them. However, the application
pages can be configured to permit access to multiple roles, for example, sales and marketing.
Single role authentication distinguishes
between different classes of users based
on their assigned role.

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.

Step 2: Specify page-specific access rights using the Properties dialog.


Step 3: Define sign-in and sign-out pages.

z Page 81

Step 4: Build your application.


Multiple role authentication
In more sophisticated role-based security systems, users can be assigned multiple roles, effectively giving them
broader access than would be granted by a single role. A simple example is that every customer service
representative may not be authorized to access customer credit card data. In this example, the customer service
supervisor has one role as a "rep" with access to customer account information, and a second role as "manager" with
authorization to issue refunds or credits. Ideally, those roles are accessible simultaneously without requiring the user
to log in under a second role.
Multiple-role authentication
distinguishes between different
classes of users based on their
assigned role. Individual
application users can have multiple
roles assigned to them, and
individual web pages can be
configured to permit access by
multiple roles.

Configuring multiple-role authentication is straightforward:


Step 1: Configure the role-based security by selecting the proper fields from the selected database tables (user name,
password, user ID, the role information and the User Role information.)

z Page 82

Multiple role security requires


several database tables with
basic user name and password
information.

Step 2: Specify page-specific access rights using the Properties dialog.


Step 3: Define sign-in and sign-out pages.
Step 4: Build your application.
Putting it all together
Iron Speed Designer automatically adds end-user authentication (sign-in) access control as a standard feature to your
applications, if you designate a User Table. You assign any number of roles and give access to any number of roles to
each user. Your sign-in feature is based on your own user table in your database. Using a wizard in Iron Speed
Designer you can quickly secure individual pages to specific roles. Specifically, Iron Speed Designer supports:

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.

Page access restriction, menu hiding, and button hiding.

Using email to send password reminders for lost passwords.

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

4. Configure your web pages for role-based security.

Step 1: Enable Role-Based Security


Command: Tools, Role-Based Security
In order for Iron Speed Designer to generate role-based security code, it must know which database tables contain
user name and password details as well as the roles.
Use the Role-Based Security
Wizard to set up page-based
and component-based access
control in your application.

Creating User Accounts in your Database


Role-based security is predicated on your applications ability to know who the user is so that appropriate page access
can be granted. This requires users to sign into the application, which in turn requires your database to contain user
name and password information for users.
If you are implementing role-based security, Iron Speed Designer requires one table in your database to be designated
as a User Table. The User Table contains a list of all of your applications users and can be any table in your
application. Within this table, you must have three important fields from which Iron Speed Designer builds the sign in
mechanism in your application:

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

An example table designated as a User


Table. This table contains normal
account information, including First
Name, Last Name, and Address, as well
as the required sign in information
(shown highlighted).

Selecting the User Table


In the Role-Based Security Wizard, make these selections:
Field

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.

Step 2: Select Roles Table

The Roles Table associates


users with their assigned roles.

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

Iron Speed Designer supports two different styles of user-assigned roles:


1. User has only one assigned role. Each user has one and only one role assigned to him. The role assignment
can be placed either in the User Table (see previous section) or in a separate Roles Table.
2. User has multiple assigned roles. Each user can have zero or more roles assigned to him. The role
assignments are in a separate Roles Table, effectively creating a one-to-many relationship between each
individual user in the User Table and multiple corresponding entries in the Roles table.
If you are implementing role-based security, Iron Speed Designer requires one table in your database to be designated
as a Roles Table. The Roles Table contains a list of your applications users and their respective roles. The Roles
Table can be any table in your application, including the User Table. Within this table, you must have two important
fields from which Iron Speed Designer builds the role-based mechanism in your application:
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.

Placing Role Information in Your User Table


In situations where an individual user has only one assigned role, the role assignment is usually maintained in the User
Table directly, although there is no requirement that this information be in the User Table.
Field

Type

UserID

Integer

FirstName

String

LastName

String

UserName

String

Password

String

RoleID

String

Address

String

A User Table with a role assignment for each user. This


configuration permits only one role per individual user.
This example shows the table designated as your
applications User Table containing the sign in information
(UserID, UserName, and Password), as well as the
assigned role (RoleID).

z Page 87

Placing Role Information in a Separate Roles Table


In systems where individual users can have multiple assigned roles, the role information must be maintained in a
separate roles table. A one-to-many relationship exists between each individual user in the User Table and multiple
corresponding entries in the Roles table.
Field

Type

UserID

Integer

RoleID

String

An example table definition of a Roles Table.


Because it is implemented as a separate table
from the User Table, this Roles table permits
multiple roles to be specified for an individual user.

UserID

RoleID

10

Customer

11

Customer Service Rep

11

Credit Card Authorizer

12

Marketing Manager

An example Roles table showing


multiple roles assigned to certain
users.

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.

Step 3: Configure Sign-In and Sign Out Pages


Sign In and Sign Out pages interface with the role-based security system, permitting your application users to log in
and log out of your application.

z Page 88

Use the Role-Based


Security Wizard to
configure your sign in and
sign out pages.

An example Sign In page


automatically generated by Iron
Speed Designer as part of its
role-based security
implementation.

z Page 89

Signing out of an application.

Configuring Sign In and Sign Out Pages


In the Role-Based Security Wizard, make these selections:
Field

Description

Menu text

The Menu text is used for the Sign In and Sign Out menu items on the
applications navigation menu.

Page name

The file name of the sign in or sign out page to be created.

Page folder

The folder where the newly created sign in or sign out page will be placed.

Step 4: Configure Web Pages for Role-Based Security


Location: Application Explorer
Command: Tools, Page Properties
Each web page or component on a page you wish to secure should be configured to accept only those users with the
appropriate roles.

z Page 90

Specify access permissions on a pageby-page or component-by-component


basis in the pages Properties dialog.

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

GEN:FieldValue with the following display styles:

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

Administering Your Application


Signing Into Your Application

z Page 92

Signing into an application


1. Start your application by typing its URL into your web browser. This is how most
application users will run your application.
Alternatively, you may run your application directly from Iron Speed Designer.
2. Click Run to run your application.
3. If your application has Sign In access enabled, click Sign In on your applications
navigation bar. The Sign In page is displayed.
4. Enter your User Name and Password.
5. Click OK to enter the application.
Administering Your Application
After signing in to your application, you may want to add application user accounts. User accounts are maintained in
the table you designated as the User Table when configuring the role-based security in Iron Speed Designer. Add,
edit, and delete user accounts from your designated User Table just as you would with any other table in your
application. The designated User Table is treated no differently than any other table in your application.
Adding user accounts to an application
1.

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.

Click New. The New page is displayed.

3.

Enter the User Name, Password, Role and other information required.

4.

Click Save to add the new user to the application.

z Page 93

LOCALIZING (INTERNATIONALIZING) YOUR APPLICATION


As part of todays global economy, business applications are being asked to span multiple geographies, and support
users in their native languages. Iron Speed Designer supports developers looking to embrace these international
requirements in the software they create.
This chapter is provided as a guide for how to internationalize (localize) applications built by Iron Speed Designer.
While Iron Speed Designer has no magic switch you can throw that generates your application in one language or
another, it does support most customizations you would naturally want to make when localizing your application.

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

Currency Formatting and Validation

Date Formatting and Validation

Error and Validation Message Strings

Enabling Language Support in Microsoft Windows

United States Phone Numbers, States and ZIP Codes

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

By specifying a culture it is possible to use a set of common preferences for


information like strings and date and number formats that correspond to users' cultural
conventions. A Web Forms page has two culture values, Culture and UICulture. The
Culture value determines or influences results of culture-dependent functions, such as
displaying the date. The UICulture value determines how the resources are loaded for
the form and is used for culture-specific lookup of resource data. The only purpose of
the UICulture value is to indicate the language the resources should load, that is,
determine which language the UI strings should use. The Culture value determines
everything else date formatting, number formatting, and so on.
The two culture settings do not need to have the same value. Depending on your
application, it may be important to set them separately. An example is a Web auction
site. The UI culture changes for each Web browser, but the culture stays constant, so
prices are always displayed in the same currency and formatting.
The Culture value can only be set to specific cultures such as en-US or en-GB. This
prevents the problem of identifying the correct currency symbol to use for "en", where
en-US and en-GB have different currency symbols.

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.

For more detail, see: http://msdn.microsoft.com/library/default.asp?url=/library/enus/vbcon/html/vbtskeditingwebconfigfileforwebformsglobalization.asp

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:

URL's referenced in the Properties dialog

Filenames of your applications source files

Database table names

Database table column names

Currency Formatting and Validation


Some currency formats use a decimal point to separate values, other formats use commas. Iron Speed Designer
supports currency display in any localized format supported by the .NET framework.

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

123 456 789,76p

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.

Date Formatting and Validation


Iron Speed Designer supports date display in any localized format supported by the .NET framework.
Iron Speed Designer also supports date 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.

Error and Validation Message Strings


Applications built with Iron Speed Designer contain a variety of data validation, information, and error messages that
are automatically included in your application. The error message and validation message strings displayed by your
application are used in:

The Iron Speed base class library.

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

Dialog box titles and other general purpose text strings.

Val

Validation error messages.

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

The following caveats apply:

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.

Editing resource files


You should only edit the resources value and leave the resources name alone. There is no need to add or remove
rows from the resource file.
You should refrain from adding your own new string resources to the resource files provided or generated by Iron
Speed Designer. Iron Speed Designer and the generated applications do not provide a mechanism for retrieving these
strings from the resource file, either at application generation time or at application run-time.
Resource files should be saved in UTF8 format, so be sure to use an editor that supports saving in this format. This
ensures that the character set you use will be manifested in the resulting text strings. Your particular text editor may
default to an encoding format other than UTF8 (e.g., BIG5), which is frequently the case for Asian-language editors. In
this case, you may need to explicitly save your resource file in UTF8. While the UTF8 format can result in larger-sized
resource files than other encoding formats, UTF8 is the most popular encoding format for web applications and most
applications support this format.
Resource Files and the Properties Dialog
Some strings in the resource files can be edited directly in the pages Properties dialog. If you change the text for a
field in the Properties dialog, this text is saved in the properties file for the particular page. At this point, Iron Speed
Designer will no longer look to the resource file for that fields string. Instead, that fields string will be taken from the
pages properties file, giving the properties file precedence over the string resource file.
Upgrading Iron Speed Designer
Please be aware that installing future versions of Iron Speed Designer may overwrite the Iron Speed Designer base
class library with a more current version. Thus, you should make a copy of any modified source code files so you can
re-apply the changes made to any new version you may install.

Enabling Language Support in Microsoft Windows


If you are not seeing all the correct language characters on your screen, or your dates and numbers are not displaying
appropriately, you may need to change certain settings in your Microsoft Windows installation.

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.

United States Phone Numbers, States and ZIP Codes


Iron Speed Designer generates specialized data display and validation code for appropriately designated database
field types. These field types include:

U.S. Phone Number

U.S. State

U.S. ZIP Code

At present, these field types only support U.S. formats and cannot be localized to other formats.

z Page 104

CONFIGURING IRON SPEED DESIGNER OPTIONS


This chapter contains information about:

Configuring the Application Builder

Configuring Build Options

Configuring the Application Builder


Command: Tools, Application Builder Options
You can set certain defaults for the Application Builder that make its operation more tailored to your use, especially if
you are using it to create a large number of similar pages.
Use the Application Builder Options
dialog to configure Application Builder
options.

Table Page Creation Options

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.

Sortable column headings

Creates table column headings that, when clicked, sort the table based on the
selected columns data.

Categorization control

A categorization control is created for the table component.

Record Page Creation Options

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.

Page Style Options

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

The file folder location where the pages are created.


<Table Name>

Each group of pages is created in a new folder bearing the


tables name.

Existing folder

Select an existing folder to place the new pages.

Configuring Build Options


Command: Build, Build Options
Compilation and application building options govern how your application is compiled.
Control how your
application is built with the
Build Options dialog.

Application Building Options

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 Studio project


file format

Visual Basic
(vbc.exe)

VBC is supplied with the .NET Framework. You do not need


to acquire this compiler separately.

Visual Studio
(devenv.exe)

Compile your application using Visual Studio .NET.

Specifies where and how to generate your applications SQL.


Inline

Build the application using inline SQL statements. The


SQL is placed in the application layers generated code.
Inline SQL generation, also called dynamic SQL is
frequently used when your application must connect to a
database that does not support Microsofts TransactSQL stored procedure language, such as Oracle or
MySQL. Inline SQL is often the best choice because it
reduces the maintenance overhead when changing SQL
syntax for different databases.

Stored procedures

Build the applications SQL in database-stored


procedures. The stored procedures are automatically
loaded into your database. Stored procedures are
frequently the best choice when overall performance is
important, because stored procedures generally execute
faster than inline SQL.

Select the version of Visual Studio .NET you are using.

z Page 108

PART III: CUSTOMIZING PAGE LAYOUT

PART III: CUSTOMIZING PAGE LAYOUT ........................................................................... 1


Creating Layout Pages........................................................................................................................... 4
What is a Layout Page? ........................................................................................................................................6
Code Generation Tags..........................................................................................................................................7
Binding Components to the Database ................................................................................................................10
A Hello World Example Using the Image Tag ..................................................................................................11
How Code Generation Tags Work ......................................................................................................................13
Code Generation Tag Syntax..............................................................................................................................15
The FieldValue Tag Basic Database Field Display..........................................................................................17
A Stand-Alone FieldValue Tag ......................................................................................................................18
Using Multiple FieldValue Tags .....................................................................................................................18
Adding Custom Layout Pages ............................................................................................................................19
Modifying Layout Pages......................................................................................................................................19
Linking Generated Add, Edit, Show Record, and Show Table Layout Pages ....................................................20

Setting Code Generation Tag Properties ........................................................................................... 22


Page Level Properties.........................................................................................................................................23
Page Level Security Options...............................................................................................................................24

Field Display Tags ................................................................................................................................ 26


FieldValue Code Generation Tag .......................................................................................................................26
FieldLabel Code Generation Tag........................................................................................................................28

Record Tags .......................................................................................................................................... 31


Record Code Generation Tag .............................................................................................................................31

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

Table Tags ............................................................................................................................................. 43


Table Code Generation Tag................................................................................................................................43
ItemTemplate Code Generation Tag ..................................................................................................................50
AlternatingItemTemplate Code Generation Tag .................................................................................................51
SeparatorTemplate Code Generation Tag..........................................................................................................52
HeaderTemplate Code Generation Tag..............................................................................................................54
FooterTemplate Code Generation Tag ...............................................................................................................55

109

Table Component Tags ........................................................................................................................ 57


FieldStatistic Code Generation Tag ....................................................................................................................57
Pagination Code Generation Tag .......................................................................................................................60
TableStatistic Code Generation Tag...................................................................................................................62

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

Component Use Tags........................................................................................................................... 76


Use Code Generation Tag ..................................................................................................................................76

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

FieldValue Tag Properties.................................................................................................................... 83


FieldValue Tag Data Source Properties .............................................................................................................84
FieldValue Tag Display Style Properties.............................................................................................................84
FieldValue Tag Dropdown List Display Style Options ........................................................................................88
FieldValue Tag Image Button Action Options .....................................................................................................89
FieldValue Tag Label Display Style Options.......................................................................................................89
FieldValue Tag Link Button Action Options ........................................................................................................90
FieldValue Tag List Box Display Style Options...................................................................................................90
FieldValue Tag Literal Display Style Options......................................................................................................91
FieldValue Tag Push Button Action Options.......................................................................................................91
FieldValue Tag Radio Button List Display Style Options ....................................................................................91
FieldValue Tag Text Box Display Style Options .................................................................................................92

Button Actions and Properties............................................................................................................ 94


Passing Primary and Foreign Key Values in URLs..........................................................................................100
Passing Parameters in URLs ...........................................................................................................................101
Enabling an Edit Icon in a Table Control ........................................................................................................103
Returning a Show Table Page with Fresh Data................................................................................................104
Calling a Custom Function when a Button is Clicked .......................................................................................105
Opening a Page in a New Browser Window .....................................................................................................106

Data Source Properties ...................................................................................................................... 107

z Page 110

Sourcing From Parents Record or Current Row in a Table .............................................................................108


Sourcing From a Table or Query ......................................................................................................................109
Adding a New Record to a Database Table......................................................................................................110
Sourcing From URL Query String Parameters .................................................................................................111
Sourcing From Foreign Key Relationships .......................................................................................................113
Advanced Filter Criteria (Multi-Table Joins)......................................................................................................114
Joining multiple tables..................................................................................................................................115
Selecting a constant value ...........................................................................................................................115
Passing parameters in a URL query string ..................................................................................................116
Using built-in functions.................................................................................................................................117
Using Custom Functions..............................................................................................................................118

Custom Pass-Through Attributes ..................................................................................................... 120


Using Pass-Through Attributes in Iron Speed Designer ...................................................................................121
Button Tag Pass-Through Attributes.................................................................................................................124
CategoryFilter Tag Pass-Through Attributes ....................................................................................................127
FieldFilter Tag Pass-Through Attributes ...........................................................................................................127
FieldLabel Tag Pass-Through Attributes ..........................................................................................................128
FieldStatistic Tag Pass-Through Attributes.......................................................................................................128
FieldValue Tag Pass-Through Attributes ..........................................................................................................128
HTML, Literal and Text Tag Pass-Through Attributes ......................................................................................130
Hyperlink Tag Pass-Through Attributes ............................................................................................................130
Label Tag Pass-Through Attributes ..................................................................................................................130
SearchFilter Tag Pass-Through Attributes........................................................................................................131
Table Tag Pass-Through Attributes ..................................................................................................................131
TableStatistic Tag Pass-Through Attributes .....................................................................................................132
Use Tag Pass-Through Attributes.....................................................................................................................132
FieldValue, Record Control, and Table Control Query Panel Pass-Through Attributes ...................................132

Producer Consumer Events .............................................................................................................. 134


Producer Consumer Event Types.....................................................................................................................135
Binding Producer Consumer Events.................................................................................................................137
Binding an Edit Button in a Show Table Page................................................................................................138

z Page 111

CREATING LAYOUT PAGES


Iron Speed Designer works by translating a declarative description of your application (HTML pages containing code
generation instructions) into a working n-tier application with well-partitioned service layers. To build and generate an
application, you provide two primary inputs to Iron Speed Designer:
1. Your applications web-based user interface pages. Your applications user interface dictates what databaseconnected controls and other components will be included in your application and generated by Iron Speed
Designer. You have complete control over your user interface design.
2. The underlying database tables upon which your application is built. Using Iron Speed Designer, the controls
included in your applications web pages are bound to the specific database tables and fields. Iron Speed
Designer uses this control-to-database binding information to build your application. The generated controls
are live and fully connected to the database, giving you an instantly functioning application.
From these basic inputs, Iron Speed Designer generates highly sophisticated, ready-to-run applications.
The Application Development Process with Iron Speed Designer
Iron Speed Designer accommodates highly iterative development. You may add user interface pages, databound
controls, and database tables to your application in any order. And, you can build your application at any time to see
the effect of your changes. Moreover, Iron Speed Designer is designed so that customizations you make to your
application are preserved when you build an application. Thus, the application development t process is not one
way. You can modify your application within or external to Iron Speed Designer in a very iterative manner.
The following diagram illustrates the application development process with Iron Speed Designer.

z Page 112

The application development process


in Iron Speed Designer. Using Iron
Speed Designer, you identify a set of
HTML layout pages and a set of
database tables. The databound
controls, represented by code
generation tags in the layout pages, are
then bound to the underlying database
tables using the Properties dialog in
Iron Speed Designer. Finally, the
application is generated using the
layout pages, table definitions, and
data bindings.

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:

What is a Layout Page?

z Page 113

Code Generation Tags

Binding Components to the Database

A Hello World Example Using the Image Tag

How Code Generation Tags Work

Code Generation Tag Syntax

The FieldValue Tag Basic Database Field Display

Adding Custom Layout Pages

Modifying Layout Pages

Linking Generated Add, Edit, Show Record, and Show Table Layout Pages

What is a Layout Page?


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 (more about this in the next section). Layout pages are
normal HTML files with .HTML file extensions. They can contain any HTML you wish, in any design you wish.
Most layout pages are created by hand using one of the popular web page layout tools, such as Macromedia
Dreamweaver, Microsoft FrontPage, and Microsoft Visual Studio. Another way to create layout pages is to let Iron
Speed Designer create them for you. Using the Application Builder, Iron Speed Designer can generate certain layout
pages from pre-formatted page templates, including pages with database table listings and for database maintenance,
such as viewing a record, adding a record, and editing a record.
<HTML>
<body bottomMargin='0' leftMargin='0' topMargin='0' rightMargin='0'>
<GEN:Image Name=Logo />
</body>
</HTML>

A very simple layout page with one


Image code generation tag.

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

<table class="master_table" cellpadding="0" cellspacing="0" border="0">


<tr>
<td class="page_yellow">
<div align="left">
<table cellpadding="0" cellspacing="0" border="0" class="holder_table">
<tr><td width=140>
</td>
<td>
<table class="dialog_view" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="dialog_header">
<GEN:Image Name="DialogIcon">
Icon
</GEN:Image>
<GEN:HTML Name="DialogTitle">
Dialog Title
</GEN:HTML>
</td>
</tr>
<tr>
<td class="dialog_body">
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td>

HTML layout pages can contain any


HTML, DHTML, or other scripting
code your application requires.

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.

Code Generation Tags


Iron Speed Designer utilizes a simple set of XML-based code generation tags that let you quickly create n-tier web
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, 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

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.

Using code generation tags you can:

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 composite components using pre-existing components.

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

Table Component Tags

FieldLabel
FieldValue

Record

Table
ItemTemplate
AlternatingItemTemplate
Separator Template
HeaderTemplate
FooterTemplate

FieldStatistics
Pagination
TableStatistics

Filter Tags

Layout Tags

Button Tags

Grouping and Iteration 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.

Binding Components to the Database


Binding is a process where the individual databound controls represented by the code generation tags in your layout
pages are bound to the underlying data sources. You bind a control by specifying the databases, tables, and fields to
be connected to the component. Iron Speed Designer uses component bindings and table bindings to generate your
applications code and user interface.
Individual components on the
page, represented by code
generation tags, are bound to
the underlying database tables
and fields. This allows Iron
Speed Designer to generate
specific code and SQL queries
corresponding to the underlying
database tables.

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

Using your database bindings, Iron


Speed Designer gathers the
necessary schema information
required to build your application.

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.)

A Hello World Example Using the Image Tag


One of the simplest code generation tags is the Image tag. The Image tag displays an image in the generated web
page, and can reference a URL, a file name, or database table. The example below shows an Image code generation
tag in an HTML layout page and the resulting page.
<HTML>
<body>
<GEN:Image Name=Logo />
</body>
</HTML>

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

After setting the Image tags URL and


generating the application, the
resulting page looks like this.

We can build on this example by adding a second Image tag.


<HTML>
<body>
This is the first image: <br><GEN:Image Name="Logo1" /><br>
This is the second image: <br><GEN:Image Name="Logo2" />
</body>
</HTML>

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

After setting two Image tags to two


different URLs and generating the
application, the resulting page looks
like this.

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.

How Code Generation Tags Work


Web designers create custom HTML Layout Pages and insert code generation tags in locations where databound
controls will be inserted. Then, use the Properties dialog to specify the type of data being displayed and other
properties for the tag. The Properties dialog saves the settings in a properties file. This HTML layout page file and the
properties file are used as input to the Iron Speed Designer to produce ASP.NET code.
The code generation tags will be replaced with one or more Presentation Layer Control Tags in the ASPX or ASCX
files generated by Iron Speed Designer. For example, a GEN:IMAGEBUTTON tag is replaced with ASP.NET
presentation layer control tags to support an action that will be taken when the button is pressed.
Code Generation tag:
<GEN:ImageButton Name=PlaceOrder/>

Presentation Layer Control Tag:


<BaseClasses:ImageButton runat="server" id="V_MyImageButton" CausesValidation="True"
CommandName="Redirect"
Consumers="None"

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/>

Presentation Layer Control Tags:


<BaseClasses:FieldValueTextBox runat="server" id="V_LastName"
Field="LastName" Columns="25" CssClass="field_input">
</BaseClasses:FieldValueTextBox>
<BaseClasses:RequiredFieldValidator runat="server" id="V_LastNameRequiredFieldValidator"
ControlToValidate="V_LastName" Enabled="False" ErrorMessage="LastName value is required.">
</BaseClasses:RequiredFieldValidator>
<BaseClasses:TextBoxMaxLengthValidator runat="server" id="V_LastNameTextBoxMaxLengthValidator"
ControlToValidate="V_LastName" ErrorMessage="Value for LastName is too long.">
</BaseClasses:TextBoxMaxLengthValidator>
<BaseClasses:FieldValueValidator runat="server" id="V_LastNameFieldValueValidator"
ControlToValidate="V_LastName" ErrorMessage="Invalid value for LastName.">
</BaseClasses:FieldValueValidator>
<BaseClasses:RecordControlCustomValidator runat="server"
id="V_LastNameRecordControlCustomValidator"
ControlToValidate="V_LastName" ErrorMessage="Invalid value for LastName.">
</BaseClasses:RecordControlCustomValidator>

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

Code Generation Tag Syntax


When generating web pages, Iron Speed Designer uses the code generation tags to generate the specific databound
controls. Configure these tags using their Properties dialogs. The HTML layout and the properties settings are used
generate a Presentation Layer Control Tag.
Code generation tags span the range of simple to the more complex. For example, to place a simple button on a
page, the web designer simply inserts this code generation tag:
<GEN:Button Name=EditCustomer/>
To place a more complex component, such as a text box that display a value of a field from a database table, you can
use code generation tags in the layout page such as:
<GEN:FieldValue Name=LastName Type=TextBox/>
Basic Syntax Rules
The basic rules of syntax for code generation tags are similar to all other XML-based markup languages:

z Page 123

All code generation tags must be closed.

All code generation tags must be well formed.

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

One word with no spaces

Must begin with a letter

Must be unique within a layout page file except in repeating layouts

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

Code Generation Tag Attributes


Attributes specify additional information about a tag. Most of the time, a tag alone is not enough information to
describe the correct behavior. Attributes are used to further explain or modify the behavior of the tag. Key-value pairs
within a tag define all attributes. The value part of an attribute is always enclosed with double quotes. Some attributes
are required while others are optional.
Example:
<GEN:Button Name=OK />
In the above example, Name is an attribute whose value is OK.
The Name attribute is a required attribute for most of the code generation tags supported by Iron Speed Designer.
Each code generation tag may have additional optional or required tags.
The Type attribute is also used for some of the code generation tags. The Type attribute specifies additional details for
a code generation tag.
Example:
<GEN:FieldValue Name=LastName Type=TextBox />
The optional attributes such as Type are considered hints provided by the web designers. You can override these
attributes in the tags Properties dialog.
Reserved Names
Several special names cannot be used in layout pages:

Page

Self

The FieldValue Tag Basic Database Field Display


Probably the most commonly used code generation tag is the FieldValue tag. The FieldValue tag fetches a field from
a database record and displays it on a web page at the specified location. The FieldValue tag generates presentation
layer controls in the generated ASPX or ASCX file. The presentation layer controls may be different based on the
different types of field values displayed, e.g., text and image.
The FieldValue tag can be used:

By itself, as an individual control unassociated with other controls on the page.

z Page 125

With other related FieldValue tags within a surrounding Record tag, or

With other related FieldValue tags within a surrounding 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.
For more detail, see:

A Stand-Alone FieldValue Tag

Using Multiple FieldValue Tags

A Stand-Alone FieldValue Tag


FieldValue tags may be used stand alone anywhere in your layout pages. Use the tags Properties dialog (discussed
later in the Setting Code Generation Tag Properties chapter of this Guide) to specify the particular database table,
field, and selection criteria necessary to fetch the appropriate data field from the database.
The example below shows a single FieldValue tag placed in a layout page.
<HTML>
<body>
<GEN:FieldValue Name=CompanyName />
</body>
</HTML>

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.

Using Multiple FieldValue Tags


Multiple FieldValue tags are typically used together to display related data elements. For example, a customers
name, address, and city are frequently stored as separate fields in a customer database table. A separate FieldValue
tag is used to display each data element as shown below.
<HTML>
<body>
<GEN:FieldValue Name=CompanyName /><br>
<GEN:FieldValue Name=Address /><br>
<GEN:FieldValue Name=City />, <GEN:FieldValue Name=State /> <GEN:FieldValue Name=ZIP />
</body>
</HTML>

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.

Adding Custom Layout Pages


When you initialized your project, you provided Iron Speed Designer with a folder location where it creates your
application. In that directory is a sub-directory called Source containing the input files, including your applications
layout pages, used to generate your application. You may place your layout pages anywhere in or underneath this
Source directory, for example:
\<Application Folder>\Source
\<Application Folder>\Source\My Pages
Simply copy or move your layout page to an appropriate directory in your applications Source directory. Iron Speed
Designer automatically recognizes pages placed here and makes them part of your application. Note: Layout pages
are normal HTML files with .HTML file extensions. It works best if you make sure your layout pages have one of these
file extensions. Iron Speed Designer recognizes layout pages only with these file extensions.
Adding a new layout page from the file system

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.

Modifying Layout Pages


After generating a layout page with the Application Builder, youll want to edit it. There are several ways to do this:
Use the Application Builder to Change the Layout Page
Command: Tools, Application Builder
If you created the page with the Application Builder and just want to add or remove a few table columns, field displays,
etc., you can simply use the Application Builder to modify the layout page. Theres no penalty for changing a page
over and over again.
Use your Favorite HTML Editor to Further Customize the Generated Layout Page
This option offers significant potential to make the page your own, allowing you to reposition the generated HTML and
code generation tags. You can add additional code generation tags, remove tags, and reposition tags. Note,
however, that after modifying the page by hand, you wont be able to edit it in the Application Builder any longer. If
you do, the Application Builder will recreate the layout page without regard to your HTML changes, causing them to be
overwritten.
Use the Editor in Iron Speed Designer to Change the Layout Page

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

The Show Table pages generated by the


Application Builder contain Edit and Show
icons (notepad and magnifying glass,
respectively) that are not hooked up. You
may optionally remove the Edit and Show
buttons, or connect them to pages.

Use the tags Properties dialog to connect these unspecified buttons. (See Setting Code Generation Tag Properties in
this Guide for details.)

z Page 130

SETTING CODE GENERATION TAG PROPERTIES


Command: Tools, Page Properties
The individual databound controls represented by the code generation tags in your layout pages are bound to the
underlying data sources. You bind a control by specifying the databases, tables, and fields to be connected to the
component. Iron Speed Designer uses component properties and table schemas to generate your applications code
and user interface.
Individual components on the page,
represented by code generation
tags, are bound to the underlying
database tables and fields. This
allows Iron Speed Designer to
generate specific code and SQL
queries corresponding to the
underlying database tables.

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:

Page Level Properties

Page Level Security Options

Page Level Properties

z Page 132

Page-level properties include the


page title.

Display Properties
Options

Description

Page Title

The Page Title is placed into the generated pages HTML <Title> tag.

Component Definition
Options

Description

Type

Indicates the type of page or panel to be generated.


Page

A page (ASPX file) is generated.

Button Panel

A header panel (ASCX file) is generated. The appropriate


producer and consumer events are automatically connected.

Footer Panel

A footer panel (ASCX file) is generated. The appropriate


producer and consumer events are automatically connected.

Header Panel

A header panel (ASCX file) is generated. The appropriate


producer and consumer events are automatically connected.

Menu Panel

A menu panel (ASCX file) is generated. The appropriate


producer and consumer events are automatically connected.

Pagination Panel

A pagination panel (ASCX file) is generated. The appropriate


producer and consumer events are automatically connected.

RangeFilter Panel

A range filter panel (ASCX file) is generated. The appropriate


producer and consumer events are automatically connected.

Search Panel

A search panel (ASCX file) is generated. The appropriate


producer and consumer events are automatically connected.

Table Panel

A table panel (ASCX file) is generated. The appropriate


producer and consumer events are automatically connected.

User Control

A user-defined control is generated.

z Page 133

Page Level Security Options


This lists the access roles that are required, if any, to view this page. If any application-defined role is selected, then
the end-user must have that role in order to access the page. When clicking on the menu bar item, the Sign In page is
displayed if the user has not already signed in.
Use the Security Settings to designate which
roles have access to the particular page.

See Securing Web Pages with Role-Based Security in Part II of this Guide for more detail on establishing user roles.

z Page 134

FIELD DISPLAY TAGS


The Field Display tags display data from the database.
For more detail, see:

FieldValue Code Generation Tag

FieldLabel Code Generation Tag

FieldValue Code Generation Tag


Purpose
The GEN:FieldValue tag places the value of a database field on the generated page. Use the tags Properties dialog
to specify the actual field whose value is to be displayed.
Use the FieldValue tag to
display field values from a
database record. FieldValue
controls can display data as
well as input data.

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

FieldValue Tag Properties


See FieldValue Tag Properties for details.
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.

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

Generates the value of the field as a checkbox.

DropDownList

Generates the current and possible values as a drop


down list.

FileUpload

Generates the value of the field as a file upload control


including a file browse button.

HyperLink

Generates a hyperlink. The URL can be specified in the


tags Properties dialog.

Image

Generates the value of the field as an image component.


This is typically used for binary fields.

Label

Generates value of the field as a Label presentation layer


control tag. The label may include HTML formatting
including being surrounded by a <SPAN> HTML tag. The
resulting value is enclosed in a <SPAN> tag. You can
also manipulate the text programmatically in the
application layer.

Literal

Generates the value of the field as 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 136

Attribute

Required

Description
RadioButtonList

Generates the current and possible values as a group of


radio buttons.

TextBox

Generates a text box or a text area.

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>

FieldLabel Code Generation Tag


Purpose
The GEN:FieldLabel tag places the name of a database field on the generated page. Typically this label is the name
of the field, though it can be anything you want. Use the tags Properties dialog to specify the actual field whose label
is to be displayed. Typically this label is the name of the field. The Application Explorer, Databases folder in Iron
Speed Designer allows you to change the default field names used.
Use the FieldLabel tag to display column
headings in a table.

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

FieldLabel Tag Display Properties

FieldLabel tag display properties.

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.

FieldLabel Tag -- Field Selection Properties

FieldLabel tag field selection


options.

Options

Description

Table, view or query

Specifies the database table containing the field whose name is being displayed.

Field

Specifies the field whose name is displayed.

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:

Record Code Generation Tag

Record Code Generation Tag


Purpose
The GEN:Record tag groups multiple FieldValue code generation tags so that the generated code is optimized. If
there is no enclosing Record tag, each FieldValue will be generated with its own enclosing RecordControl presentation
layer control tag. You can specify the selection criteria used to select the record in the tags Properties dialog.
The Record tag, used in conjunction with
FieldValue tags, displays multiple fields from the
same database record.

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

FieldValue tags within an


enclosing Record tag ensure
that each field displayed is from
the same record.
Any HTML and other code
generation tags may be included
within an enclosing Record tag.

Nested Record Tags


Nested Record tags are used to display one-to-one relationships between two database tables with a foreign key
relationship between them. The inner Record tag is bound to the "parent" table of the foreign key relationship, while
the outer tag (also a Record tag) is bound to the "child" table of the foreign key relationship. This is because the outer
Record tag's foreign key value will affect the inner Record.
Record Tag Data Source Properties
The Data Source section is a filter that specifies which records will be selected for display or editing. The Data Source
properties are described in detail in the Data Source Properties chapter later in this Guide.
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 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:

HTML Code Generation Tag

Label Code Generation Tag

HyperLink Code Generation Tag

Literal Code Generation Tag

Image Code Generation Tag

Text Code Generation Tag

HTML Code Generation Tag


Purpose
The GEN:HTML code generation tag places any HTML content specified in the tags Properties dialog on the
generated page. When the ASPX page or ASCX control is displayed, the presentation layer control for this tag will
render the HTML content in the generated page.

z Page 143

Some displayed HTML.

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/>

HyperLink Code Generation Tag


Purpose
The HyperLink code generation tag places a hyperlink on the generated page. When the ASPX page or ASCX control
is displayed, the server-side control for this tag will return the HyperLink code specified in the tags Properties dialog.
A hypertext link rendered by Iron Speed Designer.
HyperLink Tag Display Properties
HyperLink tag display
properties.

z Page 145

Options

Description

Text

The text to be displayed in the hypertext link.

Redirect URL

The destination URL displayed when the link is clicked.

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/>

Image Code Generation Tag


Purpose
The Image code generation tag places a static image on the generated page. When the ASPX page or ASCX control
is displayed, the server-side control for this tag will return a reference to the image file specified in the tags Properties
dialog.
An image generated by Iron Speed Designer.

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.

Image Tag Display Properties


Image tag display
properties.

Options

Description

Image file (URL)

The URL of the image to be displayed.

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.

Fully qualified URLs must begin with http:// or https://.

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

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 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/>

Label Code Generation Tag


Purpose
The Label code generation tag places any text on the generated page. The label will be enclosed in an HTML span
tag. When the ASPX page or ASCX control is displayed, the server-side control for this tag returns the label text
specified in the tags Properties dialog.
Generated label text.
Label Tag Display Properties
Label tag display properties.

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/>

Literal Code Generation Tag


Purpose
The Literal code generation tag places any text on the generated page. The specified text will be placed on the
generated page without any HTML adornment. When the ASPX page or ASCX control is displayed, the server-side
control for this tag returns the text specified in the tags Properties dialog.
Text generated by the Literal
tag.

z Page 149

Literal Tag Display Properties


Literal tag display properties.

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

Text Code Generation Tag


Purpose
The Text code generation tag places any text on the generated page. The text tag does not generate a server-side
control, but instead places the actual text within the ASPX page or ASCX control. There is no server-side control
generated by the text code generation tag.
Text displayed by the Text tag.
Text Tag Display Properties
Text tag display properties.

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

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:Text Name=GreatDeals/>

z Page 152

TABLE TAGS
For more detail, see:

Table Code Generation Tag

ItemTemplate Code Generation Tag

AlternatingItemTemplate Code Generation Tag

SeparatorTemplate Code Generation Tag

HeaderTemplate Code Generation Tag

FooterTemplate Code Generation Tag

Table Code Generation Tag


Purpose
The GEN:Table tag displays data from a database on the generated page. The data on the table can be retrieved
from a database table, a database view or a named query. You can specify the table or the named query in the tags
Properties dialog.
The Table code generation tag generates a presentation layer control tag in the ASPX or ASCX file. This presentation
layer control tag may contain additional presentation layer control tags to display the field values from a row in the
database table.
The Table tag, used
in conjunction with
FieldValue and
ItemTemplate tags,
produces attractive
tabular data
presentations.

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>

Record Row Layout


To specify the physical layout of a table, the content of the Table code generation tag may contain a number of
template code generation tags. Iron Speed Designer supports five template tags that can be included within the Table
code generation tag:

HeaderTemplate describes the tables column headings.

FooterTemplate describes the tables column footings.

ItemTemplate describes the layout of a row in the table.

AlternatingItemTemplate describes the layout of an alternating row in the table, a mechanism for
implementing green bars.

SeparatorTemplate describes row separators in the table.

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"/>&nbsp;<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>,&nbsp;<GEN:FIELDVALUE NAME="StateFV"
TYPE="TextBox"></GEN:FIELDVALUE>&nbsp;<GEN:FIELDVALUE NAME="ZIPFV"
TYPE="TextBox"></GEN:FIELDVALUE><br>
<br>
<GEN:FIELDVALUE NAME="HomePhoneFV" TYPE="TextBox"></GEN:FIELDVALUE>&nbsp;home<br>
<GEN:FIELDVALUE NAME="WorkPhoneFV" TYPE="TextBox"></GEN:FIELDVALUE>&nbsp;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">&nbsp;</td>
</tr>
<tr>
<td width="5">&nbsp;</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>&nbsp;to&nbsp;<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">&nbsp;</td>
</tr>
<tr>
<td colspan="4" style="border-bottom: solid 1px #cccccc">&nbsp;</td>
</tr>
</GEN:ITEMTEMPLATE>
</GEN:TABLE>
</table>
</div>
</td>
</tr>
</table><br>
</tr>
</table>
</td>
</tr>
</table>
</GEN:ITEMTEMPLATE>
</GEN:TABLE>

z Page 158

Table Tag -- Table Properties


Table tag table properties.

Options

Description

Default table size

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.

Default sort order

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.

Secondary sort order

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.

Table Tag Properties -- Data Source Options


The data source options are described in detail in the Data Source Properties chapter later in this Guide.
Used In
HTML Layout Pages and Page Templates

z Page 159

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: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 >

ItemTemplate Code Generation Tag


Purpose
The GEN:ItemTemplate tag creates a repeating layout within a GEN:Table code generation tag for displaying rows in a
table. The contents of the ItemTemplate tag are repeated at run time for each record retrieved from the database
table. If you specify a SeparatorTemplate, then its contents are added after each record. If you specify an
AlternatingItemTemplate, then the contents of the ItemTemplate and the AlternatingItemTemplate are alternated. This
is useful to show an alternating layout in the table.
The ItemTemplate tag can be placed anywhere within a Table code generation tag and may contain other code
generation tags, including another Table code generation tag and another ItemTemplate tag to specify a table inside a
table.
If no ItemTemplate tag is present, then no records from the database will be displayed. In general, there is only one
ItemTemplate tag present within a Table code generation tag. If multiple ItemTemplate tags are used, the generated
controls will repeat over the same set of records multiple times, one for each of the ItemTemplate tags. There are no
limitations on the number of ItemTemplate tags used within a Table code generation tag.

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>

AlternatingItemTemplate Code Generation Tag


Purpose
The GEN:AlternatingItemTemplate tag creates an alternating layout in a table. The contents of the
AlternatingItemTemplate tag are used for each of the alternating records retrieved from the database table.
The AlternatingItemTemplate tag may contain a layout that is different than the ItemTemplate tag. For example, not
only can the background color of the alternating row be different, but you can also show a completely different set of
fields on the two rows. If the same fields are being used in the two templates, then the names of the tags can be the

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>

SeparatorTemplate Code Generation Tag


Purpose
The GEN:SeparatorTemplate tag provides you finer control of the layout of a table by placing a separator between
records. The contents of the SeparatorTemplate tag are inserted after each ItemTemplate and
AlternatingItemTemplate tag except the last one. When the SeparatorTemplate is used, the resulting page will be as
follows:
[ItemTemplate Contents]
[SeparatorTemplate Contents]
[ItemTemplate Contents]
[SeparatorTemplate Contents]

[ItemTemplate Contents]

When AlternatingItemTemplate tags are also used, the resulting page will be as follows:
[ItemTemplate Contents]
[SeparatorTemplate Contents]
[AlternatingItemTemplate Contents]
[SeparatorTemplate Contents]

[ItemTemplate or AlternatingItemTemplate 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

HeaderTemplate Code Generation Tag


Purpose
The GEN:HeaderTemplate tag provides you finer control of the table layout by placing a header at the top of the table.
The contents of the HeaderTemplate tag are inserted at the top of the table.
In general you can specify the layout of the header area outside of the template tags without using a HeaderTemplate.
Used In
HTML Layout Pages and Page Templates.
The HeaderTemplate tag is optional and can only be specified within a Table tag.
Code Generation Tag Attributes
None. The HeaderTemplate tag does not require a Name attribute.
Examples
<GEN:Table Name=EmployeesTable>
<table>
<!-- header row -->
<GEN:HeaderTemplate>
<tr><td colspan=10>Header Row</td></tr>
</GEN:HeaderTemplate>
<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 -->
<tr><td colspan=10>Table Footer Row</td></tr>
</table>
</GEN:Table>

z Page 165

FooterTemplate Code Generation Tag


Purpose
The GEN:FooterTemplate tag provides you finer control of the layout by placing a footer at the bottom of the tabel.
The contents of the FooterTemplate tag are substituted at the bottom of the table.
In general you can specify the layout of the footer area outside of the ItemTemplate tag without using a
FooterTemplate.
Used In
HTML Layout Pages and Page Templates.
The FooterTemplate tag does not require a Name attribute and it can only be specified within a Table tag. The
FooterTemplate tag is optional.
Code Generation Tag Attributes
None
Examples
<GEN:Table Name=EmployeesTable>
<table>
<!-- header row -->
<GEN:HeaderTemplate>
<tr><td colspan=10>Header Row</td></tr>
</GEN:HeaderTemplate>
<!-- 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>
<!-- table footer -->
<GEN:FooterTemplate>
<tr><td colspan=10>Table Footer Row</td></tr>

z Page 166

</GEN:FooterTemplate>
</table>
</GEN:Table>

z Page 167

TABLE COMPONENT TAGS


The Table Component tags display various statistical and pagination control components related to a table.
For more detail, see:

FieldStatistic Code Generation Tag

Pagination Code Generation Tag

TableStatistic Code Generation Tag

FieldStatistic Code Generation Tag


Purpose
The GEN:FieldStatistic tag is used within a GEN:Table tag to display summary information about a field from a
database. For example, this tag can be used to display the total amount of all of the items in an order. The tag can
also display the total just for the records displayed on the current page.
Use the FieldStatistic tag to
sum columns in a table.

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

FieldStatistic Tag Properties Field Statistics Properties


FieldStatistic tag properties.

Options

Description

Statistic Type

The statistic to calculate.

Table, view or query

Specifies the database table containing the field whose statistic is being calculated.

Field

Specifies the field for which the statistic is calculated.

Scope

The portion of data included in the calculation.


All Pages

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

<GEN:FieldStatistic Name=PageTotal Type=Sum Scope=AllPages/>


</td>
</tr>
</GEN:FooterTemplate>
</table>
</GEN:Table>

Pagination Code Generation Tag


Purpose
The GEN:Pagination tag provides you with finer control over which pagination controls are displayed on the page.
Table pagination can be added to any table, allowing end-users to conveniently move from page to page in the table.
You can manage the number of records in a single page.
The pagination control is
automatically added to any table
where the number of records in the
table exceeds the number of rows
per page specified by the
application developer.
Some types of pagination controls simply display some data, while others allow some interaction with the application
user. For example, the CurrentPage type of Pagination control simply displays the current page number being
displayed. The NextPage type of Pagination control can be attached to a button and when the user clicks on the
buttons, the next page will be displayed. Use the tags Properties dialog to attach a button to a pagination control.
To use the composite pagination component, you can use the GEN:Use tag with Type=Pagination. The composite
component uses the GEN:Pagination tag to place some of the ten different types of pagination controls on the page.
The GEN:Use tag is described in Use Code Generation Tag.
Pagination Tag Properties
The Pagination tag Properties
dialog.

Used In
HTML Layout Pages and Page Templates within a GEN:Table code generation tag.

z Page 171

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 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

Displays the number of the first item display on the page.


For example if the 11th through the 20th items are
displayed on a page, FirstItem corresponds to the number
11.

LastItem

Displays the number of the last item display on the page.


For example if the 11th through the 20th items are
displayed on a page, LastItem corresponds to the number
20.

CurrentPage

Display the current page number.

TotalItems

Displays the total number of items returned by the query.


Not all of these items are displayed on the page.

TotalPages

Displays the total number of pages based on the current


page size.

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

Displays the first page when the attached button is clicked.

LastPage

Displays the last page when the attached button is clicked.

NextPage

Displays the next page when the attached button is clicked.

PreviousPage

Displays the previous page when the attached button is


clicked.

PageSize

Displays the number of items on a page in a text box. An


application user can change the number of items and can
press the attached Go button.

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>

TableStatistic Code Generation Tag


Purpose
The GEN:TableStatistic tag is similar to the FieldStatistic tag, but can be used outside a GEN:Table tag to display
summary information about a field from a database. For example, this tag can be used to display the total amount of
all of the items in an order. The tag can also display the total just for the records based on a query. This tag is
typically used on a dashboard page to display the number of records or the total number of records.
Use the TableStatistic tag to sum columns
in a table.

z Page 174

Specify the table and field whose total is desired in the tags Properties dialog.
TableStatistic Tag Properties -- Display Properties

TableStatistic tag display


options.

Options

Description

Field

Specifies the field for which the statistic is calculated.

Statistic Type

The statistic to calculate.


Count

Counts the number of records in the result set.

Sum

Sums the field values of the records in the result set.

TableStatistic Tag Properties -- Data Source Options


The data source options are described in detail in the Data Source Properties chapter later in this Guide.
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 175

Attribute

Required

Description

Type

Yes

The type of information to display. The following two types are supported:
Count

Displays the total number of records returned by the query specified


in the tags Properties dialog.

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:

ImageButton Code Generation Tag

LinkButton Code Generation Tag

PushButton Code Generation Tag

ImageButton Code Generation Tag


Purpose
The GEN:ImageButton tag displays an image that can be clicked by an application user to redirect the user to a
different location. Specify the image in the tags Properties dialog as a URL relative to the applications virtual
directory or a fully specified URL.
An image button generated by Iron Speed Designer.
The ImageButton tag displays the button as an HTML <input type=image src= ../> tag.
Note:

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.

ImageButton Tag Properties


The ImageButton properties are described in the Button Actions and Properties chapter later in this Guide.
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 177

Examples
<GEN:ImageButton Name=EditAddress/>

LinkButton Code Generation Tag


Purpose
The GEN:LinkButton tag displays a link that can be clicked by an application user to redirect the user to a different
location. Specify the text for the link and the URL in the tags Properties dialog.
The LinkButton tag results in an HTML <a href= ../> tag.
The email address and Edit links are
examples of the LinkButton tag in action.

Note:

To display a link for data from a database, use the GEN:FieldValue Type=LinkButton tag described in
FieldValue Code Generation Tag.

LinkButton Tag Properties


The LinkButton properties are described in the Button Actions and Properties chapter later in this Guide.
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 178

Examples
<GEN:LinkButton Name=AboutUsLink/>

PushButton Code Generation Tag


Purpose
The GEN:PushButton tag displays a button that can be clicked by an application user to redirect the user to a different
location. Specify the text of the button and the URL in the tags Properties dialog.
A push button generated by Iron Speed Designer.

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.

PushButton Tag Properties


The PushButton properties are described in the Button Actions and Properties chapter later in this Guide.
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: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:

CategoryFilter Code Generation Tag

FieldFilter Code Generation Tag

SearchFilter Code Generation Tag

CategoryFilter Code Generation Tag


Purpose
This Yahoo-style hierarchical drill-down tool can be added to any table control, allowing end-users to navigate through
the data. The hierarchical drill-down control is added automatically to any table control where one or more fields (table
columns) have been designated as a category. 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.
All > Manufacturer: Sony
If the specified Type is SubCategory, the CategoryFilter tag displays the drop down list of field values from which to
select and a label at the left displaying database field name being displayed as a category path.
The categorization drill-down control can be added
to any Show Table page where at least one data
field has been designated as a navigation
category by the application developer.

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

Table, view or query

Specifies the name of the table to be categorized.

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

Displays the navigation path for the current set of records


displayed.

SubCategory

The application user can select from a list of choices displayed


in the dropdown list.

Examples
<tr>
<td>
<GEN:CategoryFilter Name=ProductsCategoryFilter Type=Path/>
<GEN:CategoryFilter Name=ProductsSubCategoryFilter Type=SubCategory/>
</td>
</tr>

FieldFilter Code Generation Tag


Purpose
The GEN:FieldFilter tag is used to filter a table of records based on the value of a field. The field filter can be bound to
a database field of any type including a date field. Applying a filter to a database table displays a subset of the
database sorted and displayed in a particular way. For example, the table control displaying the filtered data could
contain a subset of records, such as "products that are in stock", or "customers that have purchased goods greater
than $1000". A table control 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.
A dropdown list filter selects an
Employee name.

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

Credit Card Exp. Date

Date filter with one field and a Go button.

Currency

Numeric filter with one field and a Go button.

Date

Date filter with one field and a Go button.

Decimal Number

Numeric filter with one field and a Go button.

Number

Numeric filter with one field and a Go button.

Percentage

Numeric filter with one field and a Go button.

All other fields

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

FieldFilter tag user


interface options.

Options

Description

Display Style

Specifies the type of search filter displayed.

Text Box Width

Dropdown List

The Dropdown List display style option displays a list of


values, retrieved from the database. The list contains all
values used in the designated database field.

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.

FieldFilter Tag Properties Filter Data Properties

z Page 184

FieldFilter tag data


filtering options.

Options

Description

Table

Specifies the name of the table to which the filter is applied.

Field

Specifies the field to which the filter applies.

Operator

Specifies the type of filtering operation to apply to the field.

Ignore time

If selected, a less precise comparison match is performed on Date fields.

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

SearchFilter Code Generation Tag


Purpose
The GEN:SearchFilter tag is used to search for a text string within a table of records, allowing end-users to search
data in the displayed table. The resulting table control shows matching records. The search control is added
automatically to any generated Show Table page where one or more fields (table columns) are designated as being
searchable.
The search control is automatically added to
any table where one or more data fields have
been designated as searchable by the
application developer.

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

The display properties for a SearchFilter


tag.

z Page 186

Options

Description

Text box columns

Width, in characters, of the text box used to enter the search string.

SearchFilter Tag Properties -- Search Data Properties

The search data properties for a


SearchFilter tag.

Options

Description

Table, view or query

Specifies the name of the table to be searched.

Fields

Specifies the fields to be searched.

Operator

Specifies the type of search operation to apply to the fields.

Case-sensitive

Indicates whether to perform a case-sensitive text search.

Used In
HTML Layout Pages and Page Templates

z Page 187

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:SearchFilter Name=Search/>

z Page 188

COMPONENT USE TAGS


The Component Use tags you to include other reusable components that you may have created. Iron Speed Designer
creates some standard components that you can use and you can create your own reusable components.
For more detail, see:

Use Code Generation Tag

Use Code Generation Tag


Purpose
The Use tag is an extremely powerful feature in Iron Speed Designer. The GEN:Use tag allows you to include other
reusable components on a page. The reusable components allow you to use common components across multiple
pages. Changing the component once will change all of the pages that use this component.
For example, you can create a menu that is common across the entire application and reuse this menu component on
each page by including or using the component on the page. Similarly, the header and footer on each page can be
created as components and each page can refer to them in its own layout.
For complete details, see the chapter, Building Reusable Panels and Components elsewhere in this Guide.
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 189

Attribute

Required

Description

Type

Yes

The type of component to reuse. The following types are supported:

File

No

Any

Allows you to specify any component and specify it in the tags


Properties dialog. This is also useful if you have a custom
component, do not know the type of the component to use or if
the web designer is not familiar with the various options
available.

Button

A composite button component that can be used on any page.


The composite button is made up a HyperLink tag surrounded
by HTML layout. This is different than the ImageButton,
LinkButton and PushButton tags which produce standard HTML
buttons.

Footer

A footer component that is common across all pages within an


application.

Header

A header component that is common across all pages within an


application.

Menu

A menu component that includes one or more menu items for


your application.

Pagination

A composite pagination component that consists of first page,


previous page, next page, last page and page size elements.

RangeFilter

A range filter component is a set of two filters that specify a


range. This is useful if you want an application user to display
records that are within a numeric or date range.

Search

A search component that includes a text box and a Go button.

UserControl

A customer component defined by you that is not one of the


components listed above.

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

<GEN:Use Name=OKButton Type=Button File=../Components/GreenButton.html/>

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:

Group Code Generation Tag

ForEach Code Generation Tag

Template Code Generation Tag

Align Code Generation Tag

Comment Code Generation Tag


Purpose
The GEN:Comment tag allows you to insert a comment into your layout page file that is ignored by Iron Speed
Designer.
The Comment tag does not have any properties and it does not generate any code.
Used In
HTML Layout Pages and Page Templates
Code Generation Tag Attributes
None
Examples
<GEN:CoMMent>
<GEN:Table />
<GEN:Table NAME="" />
<GEN:Table NAME="Test Case" />
</GEN:cOmmENT>
<GEN:C>
<GEN:Table />
<GEN:Table NAME="" />

z Page 192

<GEN:Table NAME="Test Case" />


</GEN:c>
<GEN:CoMMent>
<GEN:Table />
<GEN:Table NAME="" />
<GEN:Table NAME="Test Case" />
</GEN:c>

Group Code Generation Tag


Purpose
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 in the pages Properties dialog so you can easily identify the set of tags enclosed in the group.
The Group tag does not have any properties and it does not generate any code.
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.

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

ForEach Code Generation Tag


Purpose
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.
This is described in more detail in the Page Templates section of this document.
The ForEach tag cannot be used in an HTML layout page file.
Used In
Page Templates only
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:Template Type=AddOneRecord/>

Template Code Generation Tag


Purpose
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 Template tag cannot be used in an HTML layout page file.
Used In
Page Templates only

z Page 194

Code Generation Tag Attributes


Attribute
Type

Required
Yes

Description
The following types can be specified:
AddOneRecord

A template file that allows you to create a layout page


that can be used to add a new record to the database.

EditOneRecord

A template file that allows you to create a layout page


that can be used to edit an existing record from the
database in a table.

EditMultipleRecords

A template file that allows you to create a layout page


that can be used to edit multiple records from the
database.

ViewOneRecord

A template file that allows you to create a layout page


that can be used to show one record from the
database.

ViewMultipleRecords

A template file that allows you to create a layout page


that can be used to show multiple records from the
database in a table.

Examples
<GEN:Template Type=ViewOneRecord/>

Align Code Generation Tag


Purpose
The GEN:Align tag is used within page templates to align the values in an HTML TD tag. The Application Builder
replaces the Align take with the appropriate HTML fragment to align the table cell based on your input. The resulting
HTML fragment is the align attribute for the TD tag and contains one of left, center or right values.
The Align tag cannot be used in the HTML layout page files.
Used In
Page Templates only

z Page 195

Code Generation Tag Attributes


Attribute
Name

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

FIELDVALUE TAG PROPERTIES


The FieldValue tag places the value of a database field on the generated page. 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.
The FieldValue tag offers a
wide variety of display style
options.

For more detail, see:

FieldValue Tag Data Source Properties

FieldValue Tag Display Style Properties

FieldValue Tag Dropdown List Display Style Options

FieldValue Tag Image Button Action Options

FieldValue Tag Label Display Style Options

FieldValue Tag Link Button Action Options

FieldValue Tag List Box Display Style Options

FieldValue Tag Literal Display Style Options

FieldValue Tag Push Button Action Options

FieldValue Tag Radio Button List Display Style Options

FieldValue Tag Text Box Display Style Options

z Page 197

FieldValue Tag Data Source Properties


The Bindings tab designates from where the data is retrieved. The data sources are described in detail in the Data
Source Properties chapter later in this Guide.
Options

Description

Table, view or query

Specifies the database table containing the field to be displayed.

Field

Specifies the field to be displayed.

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.

FieldValue Tag Display Style Properties


The FieldValue tag offers a
wide variety of display style
options.

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

Displays a text string. 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

z Page 198

Options

Description
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. You
may not add formatting through pass-through attributes in the tags
Properties dialog.
Text Box

Displays a text entry box. This is ideal for input fields.

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

Displays a radio button list of choices, either retrieved from the


database or provided directly by you. This works well for fields with 2
to about 10 values.

z Page 200

Options

Description

Button Styles
Image Button

Displays a button containing an image retrieved from the database.

Link Button

Displays a button containing text retrieved from the database. The


button is a hypertext link.

Push Button

Displays a push button containing text retrieved from the database.

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

Displays an image retrieved from the database.

If the database field does not contain an image, the broken image
symbol is displayed by your web browser.

z Page 202

FieldValue Tag Dropdown List Display Style Options


The Dropdown List display style option displays a list of values, either retrieved from the database or provided directly
by you.
Dropdown list display style options
govern the number of records
retrieved from the database for
display in the list.

Options

Description

Create from Database

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

Specifies the individual dropdown list items to be displayed. This option is


available only if the list is not created from the database.

FieldValue Tag Image Button Action Options


You can display an Image Button whose text is extracted from the database. Image Button Action options govern both
the button display properties as well as the action taken when the button is clicked. The Image Button action options
are described in the Button Actions and Properties chapter later in this Guide.

FieldValue Tag Label Display Style Options


The Label display style displays a database field label.

z Page 203

Label display style


options.

Options

Description

Null Value text

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.

FieldValue Tag Link Button Action Options


The Link Button action displays a hypertext link button whose text is retrieved from the database. Link Button action
options govern both the button display properties as well as the action taken when the button is clicked. The Link
Button action options are described in the Button Actions and Properties chapter later in this Guide.

FieldValue Tag List Box Display Style Options


The List Box display style option displays a list of values, either retrieved from the database or provided directly by
you.

z Page 204

List Box display style options govern


the number of records retrieved
from the database for display in the
list.

Options

Description

Create from Database

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

Specifies the individual dropdown list items to be displayed. This option is


available only if the list is not created from the database.

FieldValue Tag Literal Display Style Options


The Literal display style displays a database field as straight text.
Literal display style options.

z Page 205

Options

Description

Null Value text

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.

FieldValue Tag Push Button Action Options


The Push Button action displays a push button whose text is retrieved from the database. Push Button action options
govern both the button display properties as well as the action taken when the button is clicked. The Push Button
action options are described in the Button Actions and Properties chapter later in this Guide.

FieldValue Tag Radio Button List Display Style Options


The Radio Button List display style option displays a list of values, either retrieved from the database or provided
directly by you.
Radio Button List display style
options govern the number of
records retrieved from the database
for display in the list.

Options

Description

Create from Database

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

Specifies the individual dropdown list items to be displayed. This option is


available only if the list is not created from the database.

FieldValue Tag Text Box Display Style Options


The Text Box display style displays a database field in a text box.
Text Box display style
options control the
width of the displayed
text box.

z Page 207

Options

Description

Text box columns

Specifies the percentage of the table control that should be devoted to the column in the
form <Number><Unit Type>.
Relative length units
Em

The height of the elements font.

Ex

The height of the letter x.

Px

Pixels.

Percentage. For percentage widths, 100% represents the full width.

Absolute length units


In

Inches.

Cm

Centimeters.

Mm

Millimeters.

Pt

Points. (1 point = 1/72 inch.)

Pc

Picas. (12 picas = 12 points.)

Text mode

Specifies whether a single line or multi-line control is generated.

Text box rows

Specifies the number of rows when multi-line text box is selected.

z Page 208

BUTTON ACTIONS AND PROPERTIES


Button actions determine what action is taken when a button is clicked. While there are several button types image
buttons, link buttons, and push buttons they share the same properties, which are detailed below.
Button Display Properties
The Display Properties specify what gets displayed on the button.
Button properties.

Options

Description

Button Text

The text to display in the button or link. This applies only to Link Buttons and
Push Buttons.

Image file (URL)

The URL of the button image to be displayed.

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.

Fully qualified URLs must begin with http:// or https://.

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

Validate page data

The data entered into the page is validated by the application. All data in each
data entry control on the page is validated.

Action

The action taken, or transaction performed, by the button when it is clicked.


Add Record

Add a new record to the database. Processing does not


wait until a final Submit or OK button is clicked.

Delete Record

Delete the selected record from the database


immediately. Processing does not wait until a final
Submit or OK button is clicked.

Export Data

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.

z Page 210

Options

Description
Log Out

Sign out of the application. The application user is logged


out.
The Log Out event is always consumed by the Page,
unless some form of code customization is employed
relating to this event.

Redirect

A new page, specified by the Redirect URL, is displayed.

Refresh Data

Restores the current page (or form) to its last presented


state. For Add Record pages, the input fields are cleared
of any data entered into them. For Edit Record pages,
the data fields are restored to their original values from
the database.
Refresh Data causes record controls and table controls to
refresh their data from the database, even if the fresh
data was from a concurrent modification by another user.
I.e., the most current data is always retrieved from the
database. It does not restore from the web browsers
local cache.
The Refresh Data event is usually consumed by the
Page.

Search

Applies the current filtering criteria, including a search, to


the data source. This operation is normally used for the
Go button in a search panel or a dropdown filter. The
search term is entered into a separate text box field.

Update Data

Any input data on the page is updated (saved) into the


database.
The Update Data event is usually consumed by the Page.

Custom

You can enter any command of your own. When clicked,


the button will emit an event by this name, which can be
intercepted in a code extension to your application and
processed.

z Page 211

Options

Description

Custom action

The name of the application-defined custom command executed when the


Custom Action option is selected. See Calling a Custom Function when a
Button is Clicked for details.

Send Event Notification To


Send event notification to.

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

There is no consumer of this event.

Page

The page consumes this event, indicating that all records


on the page should be updated.

Parent

The parent control consumes this event.

Parent Record

The parent record consumes this event.

Parent Table

The parent table consumes this event.

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

Button Go to Page properties.

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.

Any number of positional arguments can be included in the URL.


Numbers enclosed in curly braces indicates that the value should be
calculated from the Redirect Parameters (see below).

Back

This argument can be used with the special Redirect Parameters


"updatedata", which is related to page history (Back key) handling.
You can modify a pages OK or Cancel button to return "Back" to a
previous page with fresh data by adding a Redirect Parameters of
"updatedata". This causes the previous page to load with fresh data,
while maintaining settings (such as page size displayed, sorting, etc).

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

Redirect Parameter Types


There can be more than one parameter specified in the Redirect Parameters field. They should be separated with
commas. The format of the argument is either:
<Type>

or
<Type>:<Value>

The following types are available:


Type

Value

Description

ID

None

The primary key or Id of the record is passed as an argument to the URL.

PK

None

PK is an alias for the ID Type. The primary key is passed as the


argument.

FK

Foreign Key Name

The foreign key or foreign key id is passed as an argument to the URL.

FV

Field Value

The value of the field specified as the Value. The value is the same as it is
in the database.

FVS

Field Value String

The value of the field as a Value String. This is the same as Field Value,
but converted into a string.

FDV

Field Display String

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.

These examples show buttons in action:

Passing Primary and Foreign Key Values in URLs

Passing Parameters in URLs

Enabling an Edit Icon in a Table Control

z Page 215

Returning a Show Table Page with Fresh Data

Calling a Custom Function when a Button is Clicked

Opening a Page in a New Browser Window

Passing Primary and Foreign Key Values in URLs


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. However, the parameters passed as part of the
URL are not limited to the primary and foreign keys. You can pass any field value, as well as display values. The
display values might be different than the field values for example, for Boolean fields, the field value might be 1 or 0,
but the display value might be True or False.
The parameters are passed as part of the Redirect URL and Redirect Parameters that are available for any of the
buttons such as PushButton, LinkButton, and ImageButton; and for links such as Hyperlink.
The Redirect Parameters field specifies a comma delimited set of arguments that can be passed on the URL and the
Redirect URL uses the {0}, {1}, etc. to pick the first argument, second argument, etc. Note that the first argument is {0}
since the arguments numbers are zero based.
Tag Property

Setting

Button Text

Add

Action

Redirect

Send notification event to

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

Send notification event to

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

Send notification event to

Parent Record

Redirect URL

ShowEmployeePhotoRecord.aspx?First={0}&Last={1}

Redirect Parameters

FV:FirstName,FV:LastName

Passing Parameters in URLs


A component can interact indirectly with other components by interacting with the pages HTTP response object and
causing a client-side redirect to a different page (i.e. a different URL). This is similar to interaction using events, but
instead of creating an event object, the component would redirect the clients browser to a new URL. By dynamically
constructing the URL, the component can choose the page to which the user will be redirected. Also, using URL
parameters, the component can pass data to the new page. The benefit of this over interaction using events is that it
works even for components on different pages. However, because URLs are limited to a browser-specific maximum
length, the quantity of data that can be passed to a new page is fairly limited. Also, unlike events, a redirect will cause

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:
&nbsp;
<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

Code generation tag

Product

Table, view or query

Products

URL query string parameter

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.

Enabling an Edit Icon in a Table Control


A good example illustrating the concept of page redirection to another page is the Edit icon (notepad icon) in a table
control that, when clicked, displays an Edit Record page. Moreover, buttons can initiate an action on the data
contained in the table.
Step 1: Create a layout page either by hand or using the Application Builder. Set the data binding properties for the
table as you normally would. (Note: The Application Builder creates automatically bound pages, saving you this step.)
Step 2: Set the properties for the RecordRowEditButton tag, nested inside the Table, ItemTemplate. Fill in the
required information as you normally would for any button.
Any button can be set to redirect to another page. In this
example, the edit icon (notepad icon) in a table control is
connected to a separate Edit Record page. When the
notepad icon is clicked, the Edit Record page is
displayed.

z Page 219

Step 3: Fill in the required information as shown below.


Tag Property

Setting

Image file (URL)

../Images/Everest/Icon_edit.gif

Action

Redirect

Send notification event to

Parent Record

Redirect URL

EditEmployeeRecord.aspx?Employees={0}

Redirect Parameters

ID

Returning a Show Table Page with Fresh Data


A good example illustrating the concept of page redirection is adding an OK button to a page that refreshes the
associated Show Table page to show updated (refreshed) data.
Step 1: Create a layout page either by hand or using the Application Builder. Set the data binding properties for the
table as you normally would. (Note: The Application Builder creates automatically bound pages, saving you this step.)
Step 2: Set the properties of the OKButton tag so that it returns to the Show Table page when clicked.

z Page 220

Any button can be set to redirect to another location,


including the same page.

Step 3: Change the OKButtons properties as shown below.


Tag Property

Setting

Button Text

OK

Action

Update Data

Send notification event to

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

Calling a Custom Function when a Button is Clicked


You can call custom code functions of your own when a button is clicked. The buttons Properties dialog settings have
a custom function called ExportToPDF which is invoked when the button is clicked.
Tag Property

Setting

Button Text

Export to PDF

Validate page data

No

Action

Custom

Custom action

DisplayAsPDF

Send notification event to

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

Opening a Page in a New Browser Window


The GEN:Button tags, as well as their subsidiary tags such as GEN:LinkButton, GEN:ImageButton and
GEN:PushButton, produce an action that requires a postback because some buttons, such as OK, are used to

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

DATA SOURCE PROPERTIES


The data sources determine which records are selected from the database for display or editing. Data sources provide
a built-in filtering mechanism so you can control how much data is displayed in a Table or FieldValue control. In more
detailed terms, the data sources form the basis of the underlying SQL querys WHERE clause, and for experienced
programmers, this is perhaps the best way to think about data sources. Depending on the data sources you specify,
the result set can be as simple as single record from a single database table or as complex as multiple rows from a
multi-table join.
The Data Source section,
shown here for a Table tag,
is a filter that specifies
which records will be
selected for display or
editing.
The FieldValue, Record,
Table, and TableStatistics
tags all use variants of
these data source options.

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:

Sourcing From Parents Record or Current Row in a Table

Sourcing From a Table or Query

Adding a New Record to a Database Table

Sourcing From URL Query String Parameter

Sourcing From Foreign Key Relationship

Advanced Filter Criteria (Multi-Table Joins)

Sourcing From Parents Record or Current Row in a Table


Selecting the data source as the parent tags
record allows a Record or Table tag to aggregate
data retrieval for a collection of enclosed
FieldValue tags.
The selection criteria of the controls associated Record or Table tag are used. This option allows you to select a
database table and field based on the enclosing Record tag properties you previously specified. You do not need to
specify the source of the record repeatedly for each of the field values contained in the record.
This is common for FieldValue tags enclosed within a surrounding Record or Table tag where the objective is to
display a related set of fields coming from a single selected record. In this case, the Record or Table tag specifies the
record that is selected and the FieldValue controls display the individual fields.
<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>

The record retrieved by the parent tag a


Record tag or Table tag determines the data
displayed for the enclosed FieldValue tags.

z Page 225

In this example, the customer information is


sourced from a single record in the Customers
table and displayed on the web page. The
Record code generation tag is bound to the
Customers table. The individual FieldValue tags
are set to source their data from Select
record(s).

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.

Sourcing From a Table or Query


The data comes from a database
table or as the result of a query.

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>

The record retrieved by the parent tag a


Record tag or Table tag determines the data
displayed for the enclosed FieldValue tags.

z Page 226

In this example, the customer information is


sourced from a single record in the Customers
table and displayed on the web page. The
Record code generation tag is bound to the
Customers table. The individual FieldValue
tags are set to source their data from Select
record(s).

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.

For more detail, see:

Sourcing From URL Query String Parameter

Advanced Filter Criteria (Multi-Table Joins)

z Page 227

Adding a New Record to a Database Table


Use this Record tag to add a new record to
the database.

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>

Code generation tags can both display


data as well as input data, depending
on their property settings. Either way,
there is no difference in how the code
generation tags are used in your layout
page.

In this example, the name, address,


and other contact information is
collected from the web page and
inserted into the Customers table in the
database. The Record code
generation tag is bound to the
Customers table. The individual
FieldValue tags would typically have
their data sources bound to Add new
record.

z Page 228

Sourcing From URL Query String Parameters

The data comes from a database table or as the result of a query.


Check this option to provide the records primary key value via the generated web pages URL. This primary key value
is then used to select the specified record from the database. This is a very common way of requesting individual
records to be displayed.
The URL contains the primary key value of
a record in the database. Your application
parses the URL query string, extracts the
primary key value, and performs the record
lookup in the database.
In this example, a query string called ID
is used in the URL to convey a primary key
value of Bob Pinkston. Bob Pinkstons
record is retrieved from the Customers
table and displayed by a series of
FieldValue tags in the generated web
page.

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

with the corresponding selection criteria of:

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:

Sourcing From Foreign Key Relationships


Iron Speed Designer displays the
foreign key relationships associated
with the selected table or query so
they can be easily added to your
selection criteria.
If this option is selected, the field is assumed to contain foreign key values that link to another table. You can fetch
and display data from the foreign table and display it instead of the foreign key value itself.
You can further choose to hop one level to the next record connected by the original record. For example, if you
have an Order record containing a Customer ID, you can display the Customers Last Name by selecting the Foreign
Key relationship of Orders to Customers. This is only applicable from a parent to a child, not from a child to a parent.
<GEN:Record Name=Orders>
<td><GEN:FieldValue Name="ID"/></td>
<td><GEN:FieldValue Name="Customer"/></td>
<td><GEN:FieldValue Name="Date"/></td>
<td><GEN:FieldValue Name="Amount"/></td>
</GEN:Record>

Even though the parent tag is


bound to the one table, you can
display data from other tables
via foreign key references.

z Page 230

In this example, the parent tag


is bound to the Orders table.
The page displays FieldValue
tags bound to the Customers
table by using the foreign key
relationship between
Orders.Customer and the
Customers table.

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.

Advanced Filter Criteria (Multi-Table Joins)


Add any selection criteria you want to form the query
used to retrieve data, including other SQL clauses,
logged in user information, and other URL query
parameters

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:

Joining multiple tables

Selecting a constant value

Passing parameters in a URL query string

Using built-in functions

Using Custom Functions

Joining multiple tables


One of the more powerful features in Iron Speed Designer is the ability to generate multi-table joins. A multi-table join
is the result of a query that joins together two or more database tables using a set of joining conditions. For example,
an Orders table may be joined with a Customers table to display a table containing order information and customer
information in the same row (logical record). The result is a table that contains columns (database fields) from the
various joined tables.

z Page 232

Select Table and Field to join


two tables together.

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.

Selecting a constant value


In many cases, its useful to constrain the result set to records with a particular ID value, constant name, or other
value. For example, to create a table showing only the Western Regions orders, you may create selection criteria
where one constraint is that the sales territory is Western Region, e.g.:
Order.SalesTerritory is equal to Western Region

Or, you might constrain the data to orders larger than $50,000, e.g.:
Order.TotalAmount is greater than 50000

Select Constant to constrain the selection


criteria to a particular record ID value, constant
name, or other value.

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.

Passing parameters in a URL query string


You can constrain the selection criteria using data passed into the page from the pages URL. This is a very common
way of requesting individual records to be displayed.
Select URL Query String to constrain the
selection criteria by a parameter passed
into the control from the pages URL.

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

with the corresponding selection criteria of:


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.

Using built-in functions


In many cases, its useful to constrain the result set to records pertaining to the currently logged in user. For example,
in a customer portal application, you may want to display the customers recent order history. Obviously you should

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.)

Using Custom Functions


In most applications there are a few cases where its useful to constrain the result set to records based on values
computed by your own custom code. For example, in a customer portal application, you may want to calculate and
display a customers available credit capacity.
You can write a custom function in Visual Basic or other .NET language that is called by your application and used as
part of the selection criteria when selecting and displaying data. Custom functions return a value that is compared to
the record's field value when that record is read at runtime. Based on the comparison of the two, the record is either

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.

Note: Custom functions are not available in named queries.


Use a custom function of your own to
constrain the selection criteria to retrieve
data.

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().

Passing Parameters to Custom Functions


You can pass any kind of parameter you want into a custom function, but the parameter must be meaningful within the
scope of the custom function and its surrounding class structure. (Record source queries are added as data reader
filters in the page's code-behind).
For example, you can pass column references into the function:
MyCustomFn(CustomFunctionDemo.ProductsAccess.Instance.UnitsOnOrderColumn)
Note that this is really only a column reference, and not the actual column's data. This is because there is no data
available (yet) at "add filter time".
Record source custom functions are only used as a right hand side operand for a comparison operation, e.g.
WHERE Products.UnitsOnOrder > MaximumOnOrderLevel()
It is possible to filter data using a custom function, but this involves customizing a code-behind rather than invoking a
custom function set in the tags Properties dialog. Custom functions themselves only return right-hand side values that
are used by the filtering code.

z Page 237

CUSTOM PASS-THROUGH ATTRIBUTES


The pass-through attribute feature allows you to extend the attribute model of code generation tags. Attributes are
component properties whose values are assigned in the tags Properties dialog and sometimes directly in the
properties file. Normally, attributes are properties like DisplayStyle, URL, etc. However, you can create your own
pass-through attributes and set them directly in the tags Properties dialog.

Pass-through attributes on the Properties tab in the tags Properties dialog.


When generating the presentation layer code, Iron Speed Designer passes the pass-through attribute and value pairs
to the ASP attribute name and value.
Pass-Through Attribute Definitions
The terms Property and Attribute are used extensively in the .NET documentation, but are not clearly defined in an
easy to find place. Here are the definitions:
A server control's Properties are the things listed as Properties in the .NET documentation for the control class.
Properties can be set declaratively in the server control's tag by specifying an attribute name/value pair within the
control's start tag. Any attribute name / value pair within the control's start tag with a name that doesn't match one of
the control's properties is an Attribute, and is "passed through" into the control's Attributes collection. Most controls
render their Attributes inside the HTML tag rendered by the control.
For example, Button controls have a CausesValidation property, but not an OnClick property. However, either
"CausesValidation=True" or "OnClick='javascript:...'" will cause the button to render an HTML tag with an OnClick
attribute. (Note that in the previous example, setting both CausesValidation=True and OnClick will cause a conflict.)
Also note that certain controls, like Literal, do not allow Attributes; they only allow Properties.

z Page 238

For more information, see:

Using Pass-Through Attributes in Iron Speed Designer

Button Tag Pass-Through Attributes

CategoryFilter Code Generation Tag

FieldLabel Tag Pass-Through Attributes

FieldStatistic Tag Pass-Through Attributes

FieldValue Tag Pass-Through Attributes

HTML, Literal and Text Tag Pass-Through Attributes

Label Tag Pass-Through Attributes

SearchFilter Tag Pass-Through Attributes

Table Tag Pass-Through Attributes

TableStatistic Tag Pass-Through Attributes

Use Tag Pass-Through Attributes

FieldValue, Record Control, and Table Control Query Panel Pass-Through Attributes

Using Pass-Through Attributes in Iron Speed Designer


Any component can have pass-through attributes and you can create and set them on the Properties tab in the tags
Properties dialog. For example, almost every item in every Basic tab has a corresponding pass-through attribute. The
name of a pass-through attribute needs to be unique in the pass-through attribute collection. Pass-through attributes
and their values are physically stored in your applications properties files as part of the XML schema for the specific
component. Iron Speed Designer stores the attributes in sorted order by attribute name in the properties file.
Pass-through attributes are designed for pass-through, i.e., an escape mechanism for data-driven extensions, as
opposed to code-driven extensions. Iron Speed Designer depends on non-pass-through attributes. For example the
database refreshing facility depends on Field and Table attributes of the FieldValue tag. Even though these
attributes are modeled in XML Schema as optional, it would not be desirable to put them in pass-through attributes.
View pass-through attributes as a data driven extension mechanism based on some agreed upon conventions.

z Page 239

Pass-through attributes during application generation


Every code generation tag (except GEN:Text) is replaced during generation with a .NET server control tag. The type
of this "primary" tag is dependent on the code generation tag's properties in some cases. For example,
GEN:FieldValue is replaced by different server control tags depending on the display style. Every type of .NET server
control supports a different set of runtime properties. Most, but not all, of these property can be initialized using passthrough attributes. The list of valid pass-through attributes is determined by the server control class and its super
classes and interfaces. Most of these properties, except a few properties added specifically to the Iron Speed
Designer custom controls, are in the .NET documentation for each control class. Also, the valid values for each
property can depend on the control type, the property, and in some cases the values of other properties for that control
instance.
Some code generation tags also generate additional non-primary server control tags. For example, GEN:FieldValue
generates zero to five validator control tags in addition to the primary tag, depending on the code generation tag's
properties. Each of these non-primary tags also supports a set of runtime properties as described above. These can
also be set using pass-through attributes, but the pass-through Name must be prefixed with the generated ID of the
secondary tag in order to alert Iron Speed Designer that the pass-through is for a non-primary tag rather than the
primary tag.
Pass-through attributes at run-time
Most server control tags are replaced by Microsoft IIS at runtime with one or more HTML tags in the actual HTTP
response sent to the client. The type and syntax of the HTML tag(s) is determined at runtime by the control's
properties and the client's browser type. Most of these controls will "pass through" any attributes that do not
correspond to one of their control properties as attributes of the HTML tag. For example, the GEN:Label code
generation tag corresponds to a Label server control. Label server controls do not have an "OnClick" property, but if
you add something like
OnClick="'alert('Hello.');"
as an attribute of the Label's tag, it will render as something like
<span id=... OnClick="alert('Hello.');" ... />
Therefore, each server control supports an additional set of pass-through attributes that correspond to the HTML
attributes of the HTML tags they render as during runtime.
Since most of the server control properties affect the HTML tags and/or attributes rendered by the control, it is possible
for an HTML pass-through to conflict with a server control pass-through. For example, if a DropDownList's
AutoPostBack property equals True, it will render as an "OnChange" attribute of the HTML SELECT tag rendered at
runtime. If the DropDownList also had an HTML pass-through attribute named "OnChange" (e.g. OnChange="return
false;"), the two would conflict and problems may occur. Therefore, the list of valid pass-through attributes, the valid
values of each of them, and the effect of the valid values often varies depending on the presence and values of other
pass-through attributes or properties.

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 button or hyperlink display a confirmation popup when clicked.

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.

Example: Make a FieldValue tag Literal display as bold


Set the following pass-through attributes in the Properties dialog for a FieldValue tag:
Pass-Through Attribute

Description

Style

Label
This is the tags display style.

z Page 241

Pass-Through Attribute

Description

Font-Bold

True

Alternatively, you could also set these pass-through attributes:


Pass-Through Attribute

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.

Button Tag Pass-Through Attributes


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.
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, for example, 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 that are passed to the underlying control are prefixed with P- followed by the name of the
control.
Pass-Through
Attribute

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.

CommandArgument supplements the Command Name parameter in the Basic tab.


The syntax and affects of individual arguments vary depending on various factors,
including the Redirect Url / Command Name value, the button consumers' properties,
table schemas, etc.
deleteonupdate

CommandName

This argument is typically used when the Command Name is


Delete Record. The selected record is hidden immediately,
but not deleted from the database until / unless the consuming
Table Controls data is saved.

The particular command to execute upon button click.

z Page 243

Pass-Through
Attribute

Consumers

Description

AddRecord

Add a new record to the database. Processing does not wait


until a final Submit or OK button is clicked.

DeleteRecord

Delete the selected record from the database immediately.


Processing does not wait until a final Submit or OK button is
clicked.

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

Perform a database query and display the resulting data in a


table. This operation is normally used for a Go button in a filter
field panel. The filter criteria are entered into separate text box
and dropdown list fields.

GotoNext

Go to the next page in the table. The associated database query


is executed and the next page of data is returned from the
database and displayed in the associated table.

GotoPrevious

Go to the previous page in the table. The associated database


query is executed and the previous page of data is returned from
the database and displayed in the associated table.

LogOut

Sign out of the application. The application user is logged out.

Redirect

A new page, specified by the Redirect URL, is displayed.

Reset Data

Clear any data entered on the input form (page).

Search

Perform a search on the database. This operation is normally


used for the Go button in a search panel. The search term is
entered into a separate text box field.

UpdateData

Any input data on the page is updated in the database.

Custom

You can enter any command of your own.

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

There is no consumer of this event.

Page

The page consumes this event, indicating that all records on


the page should be updated.

Parent

The parent control consumes this event.

ParentRecord

The parent record consumes this event.

ParentTable

The parent table consumes this event.

ImageURL

The URL of the button image to be displayed.

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

This argument can be used with the special Redirect Argument


"updatedata", which is related to page history (Back key) handling.
You can modify a pages OK or Cancel button to return "Back" to a
previous page with fresh data by adding a Redirect Argument of
"updatedata". This causes the previous page to load with fresh data, while
maintaining settings (such as page size displayed, sorting, etc).

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.

CategoryFilter Tag Pass-Through Attributes

z Page 245

Pass-through attributes

Description

Fields

A comma separated list of fields to be used by the


Category Filter.
Ex: State,City,Street

InternalUse:Table

The name of the table containing the Field specified


earlier.

V_CategoryFilterPathContainer:CssClass

A cascading style sheet class name to be used for the


path portion of the category filter.

V_CategoryFilterSubcategoryContainer:CssClass

A cascading style sheet class name to be used for the


sub-category portion of the category filter.

FieldFilter Tag Pass-Through Attributes

Pass-Through
Attribute

Description

Columns

The width of the text box if the style indicates the field filter is a text box.

Field

Specifies the field to which the filter applies.

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.

FieldLabel Tag Pass-Through Attributes

Pass-Through
Attribute

Description

Field

Specifies the field whose name is displayed.

z Page 246

Pass-Through
Attribute

Description

Table

Specifies the database table containing the field whose name is being displayed.

Text

The text to display.

FieldStatistic Tag Pass-Through Attributes

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.

FieldValue Tag Pass-Through Attributes

Pass-Through Attribute

Description

CheckedValue
Columns
CssClass

This is generated by the Application Builder and not set directly.

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

For list-style FieldValue controls, specifies the maximum number of


values that will be automatically populated in the control.

z Page 247

Pass-Through Attribute

Description

NullValueText

Specifies the text to be displayed or inserted into the database if the


underlying database field has a null value (no value).

Rows

Specifies the number of rows when multi-line text box is selected.

SaveData

Forces or 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 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.

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

Specifies whether a single line or multi-line control is generated.

UncheckedValue
V_<TAG NAME>FvLlsHyperLink:
Enabled

V_<TAG NAME>FvLlsHyperLink:
MinListItems

Specifies whether the large list selector control is automatically displayed


along side the FieldValue component if the field has the minimum
number of required values.
True

Display the large list selector component if the FieldValue


component has the minimum number of required values.

False

Do not display the large list selector component.

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.

HTML, Literal and Text Tag Pass-Through Attributes

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.

Hyperlink Tag Pass-Through Attributes

Pass-Through
Attribute

Description

NavigateURL

The destination URL displayed when the link is clicked.

Target

The name of the destination frame or browser, if a new browser is to be launched.

Text

The text to be displayed in the hypertext link.

Label Tag Pass-Through Attributes

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.

SearchFilter Tag Pass-Through Attributes

z Page 249

Pass-Through
Attribute

Description

CaseSensitive

Indicates whether the search should be case sensitive.


true

Indicates that a case-sensitive text search should be performed.

false

A case sensitive search is not performed.

Columns
Fields

Specifies the fields to be searched.

Operator

Specifies the type of search operation to apply to the fields.

Table Tag Pass-Through Attributes

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.

TableStatistic Tag Pass-Through Attributes

Pass-Through
Attribute

Description

QueryFunction

The statistic to calculate.


Count

Counts the number of records in the result set.

Sum

Sums the field values of the records in the result set.

QueryParameters
TableName

The database table or view to which the calculation is performed.

Use Tag Pass-Through Attributes

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.

FieldValue, Record Control, and Table Control Query Panel Pass-Through


Attributes

Pass-Through
Attribute

Description

ParentIdField

z Page 251

PRODUCER CONSUMER EVENTS


Components in an application must communicate with each other in order for the application to function. For example,
a search control must interact with the database and then instruct the corresponding data grid table to update itself
with the result set of the search. Similarly, a selection made in a dropdown filter must inform the data grid table to
display only those matching records.
In the Iron Speed Designer model, an application is composed of multiple pages and each page contains multiple
components. These components usually have no knowledge of the pages other components. However, some
components need to interact with one or more other components at run-time. One way Iron Speed Designer provides
to do this is producer consumer events.
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.
Event notifications flow from one component
to another through the hierarchy of code
generation tags (components) in a page.

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:

Producer Consumer Event Types

Binding Producer Consumer Events

Binding an Edit Button in a Show Table Page

Producer Consumer Event Types

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*

*Supports or requires event arguments


Event

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

This event adds a new record or row to a table control.

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.

Binding Producer Consumer Events


Command: Tools, Page Properties
Producer consumer events are set in the Events tab in the tags Properties dialog. Pages and components created by
the Application Builder are automatically bound and rarely need to have their events modified. Furthermore,
components in custom layout pages and set using the Properties dialog generally do not require additional event
binding.

z Page 255

A set of producer / consumer events for a page. In this example, a number of


components in a Pagination control send events to their associated Table control. This
mechanism is how the table is instructed to go from one page to another, fetching new
data from the database.
Note: The name Self implies the page or component layout page file not the specific code generation tag that is
currently selected in the tree hierarchy. One of the most often made mistakes is to assume Self corresponds to the
currently selected nodes.

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

Binding an Edit Button in a Show Table Page


A good example illustrating the concept of producer / consumer events is the way Iron Speed Designer associates
buttons in a table view panel to a table. These properties enable the buttons to initiate an action on the data contained
in the table.
Step 1: Create a layout page either by hand or using the Application Builder. Set the data binding properties for the
table as you normally would. (Note: The Application Builder creates automatically bound pages, saving you this step.)
Step 2: Set the properties for the EditButtonBar code generation tag. Fill in the required information as you normally
would for any button.
Tag Property

Setting

Button Text

Edit

Action

Redirect

Send notification event to

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

PART IV: EXTENDING GENERATED APPLICATION CODE

PART IV: EXTENDING GENERATED APPLICATION CODE .................................................... 1


Integrating Custom Code with Your Application................................................................................. 6
Architecture of Generated Applications............................................................................................... 8
Tier 1: The Presentation Layer .............................................................................................................................9
Tier 2: The Application Layer (Business Objects).................................................................................................9
Tier 3: The Database Layer ................................................................................................................................10
Application Compilation and Configuration Tools ...............................................................................................10

Application Folder Organization ......................................................................................................... 12


...\<Application Folder> .......................................................................................................................................12
Files generated by Iron Speed Designer .......................................................................................................13
Files provided for convenience ......................................................................................................................14
...\<Application Folder>\bin .................................................................................................................................15
...\<Application Folder>\DataAccess...................................................................................................................16
Data model class-related files........................................................................................................................18
Example: An Orders Table.............................................................................................................................18
...\<Application Folder>\Images ..........................................................................................................................19
...\<Application Folder>\<Subfolder> ..................................................................................................................19
...\<Application Folder>\OtherComponents.........................................................................................................20
...\<Application Folder>\OtherPages...................................................................................................................21
...\<Application Folder>\Source...........................................................................................................................21
...\<Application Folder>\Source\Bin ....................................................................................................................22
...\<Application Folder>\Source\DataAccess ......................................................................................................23
...\<Application Folder>\Source\Images..............................................................................................................23
...\<Application Folder>\Source\OtherComponents ............................................................................................23
...\<Application Folder>\Source\OtherPages ......................................................................................................23
...\<Application Folder>\Source\<Subfolder> ......................................................................................................24
...\<Application Folder>\Source\Styles................................................................................................................24
...\<Application Folder>\StoredProcedures .........................................................................................................24
...\<Application Folder>\Styles ............................................................................................................................25

Iron Speed Designer File Folder Organization................................................................................... 26


...\<Iron Speed Folder>\Designer........................................................................................................................26
...\<Iron Speed Folder>\Designer\Bin .................................................................................................................26
...\<Iron Speed Folder>\Designer\Globalization\Resources ...............................................................................26
...\<Iron Speed Folder>\Designer\Page Templates ............................................................................................27
...\<Iron Speed Folder>\IronSpeedBase .............................................................................................................28
...\<Iron Speed Folder>\IronSpeedBase\Bin .......................................................................................................29
...\<Iron Speed Folder>\IronSpeedBase\Configuration.......................................................................................29
...\<Iron Speed Folder>\IronSpeedBase\Data.....................................................................................................30
...\<Iron Speed Folder>\IronSpeedBase\Data\Columns .....................................................................................30

258

...\<Iron Speed Folder>\IronSpeedBase\Data\DataReader ................................................................................30


...\<Iron Speed Folder>\IronSpeedBase\Data\SQLProvider...............................................................................30
...\<Iron Speed Folder>\IronSpeedBase\obj .......................................................................................................30
...\<Iron Speed Folder>\IronSpeedBase\Utils .....................................................................................................30
...\<Iron Speed Folder>\IronSpeedBase\Web.....................................................................................................31
...\<Iron Speed Folder>\ProjectTemplate............................................................................................................31
...\<Iron Speed Folder>\ProjectTemplate\Source\Bin .........................................................................................32

Generated Web Pages.......................................................................................................................... 33


Server Control Tags ............................................................................................................................................33
Client-Side JavaScript in Generated Pages........................................................................................................34
Using DHTML in Generated Pages ....................................................................................................................34
Using Frames in Generated Web Pages ............................................................................................................35
Browser Compatibility .........................................................................................................................................36
Table Controls and .NET DataGrid Controls.......................................................................................................36
Register Directives and Code Generation Tags .................................................................................................37
Custom HTTP Headers, Bodies, and Other Page Sections ...............................................................................37

Presentation Layer Control Tags ........................................................................................................ 39


Overview .............................................................................................................................................................39
Common Elements..............................................................................................................................................39
BaseClasses:Button control tag ..........................................................................................................................39
BaseClasses:BasePageSettings control tag.......................................................................................................40
BaseClasses:CategoryFilterControl control tag ..................................................................................................40
BaseClasses:CompareValidator control tag .......................................................................................................41
BaseClasses:CustomValidator control tag..........................................................................................................42
BaseClasses:DateFieldValueFilterControl control tag........................................................................................42
BaseClasses:DropDownList control tag..............................................................................................................43
BaseClasses:FieldNameLabel control tag ..........................................................................................................44
BaseClasses:FieldValueTextBox control tag ......................................................................................................44
BaseClasses:FieldValueValidator control tag .....................................................................................................44
BaseClasses:FieldSortControl control tag ..........................................................................................................45
BaseClasses:HyperLink control tag ....................................................................................................................45
BaseClasses:ImageButton control tag................................................................................................................46
BaseClasses:Image control tag ..........................................................................................................................46
BaseClasses:Label control tag ...........................................................................................................................47
BaseClasses:LinkButton control tag ...................................................................................................................47
BaseClasses:MenuLink control tag.....................................................................................................................48
BaseClasses:NumberValidator control tag .........................................................................................................48
BaseClasses:PasswordValidator control tag ......................................................................................................49
BaseClasses:Panel control tag ...........................................................................................................................50
BaseClasses:PagingControl control tag .............................................................................................................50
BaseClasses:PlaceHolder control tag.................................................................................................................51
BaseClasses:RadioButton control tag ................................................................................................................51
BaseClasses:RequiredFieldValidator control tag ...............................................................................................51
BaseClasses:RecordControlCustomValidator control tag ..................................................................................52
BaseClasses:RecordControlImageButton control tag ........................................................................................52
BaseClasses:ShortDateValidator control tag......................................................................................................53
BaseClasses:SearchTextControl control tag ......................................................................................................53
BaseClasses:TableControlRadioButton control tag............................................................................................53

z Page 259

BaseClasses:TableControlRepeater control tag.................................................................................................54


BaseClasses:TableControlFieldSumLabel control tag .......................................................................................54
BaseClasses:TextBox control tag .......................................................................................................................54
BaseClasses:TextBoxMaxLengthValidator control tag.......................................................................................55

Special Key and Button Handling ....................................................................................................... 56


Page History (Back Button) Handling .................................................................................................................56
Capturing the Enter Key in Layout Pages...........................................................................................................56

Generated Application Layer Classes ................................................................................................ 59


Page Classes ......................................................................................................................................................60
<PAGE>Gen Class ........................................................................................................................................60
<PAGE> Class...............................................................................................................................................61
Record Classes...................................................................................................................................................62
<TABLE>RecordGen Class ...........................................................................................................................63
<TABLE>Record Class..................................................................................................................................64
Table Access Classes.........................................................................................................................................64
<TABLE>AccessGen Class ...........................................................................................................................65
<TABLE>Access Class..................................................................................................................................66
Virtual Record Classes........................................................................................................................................66
<COMPONENT>RecordGen Class...............................................................................................................67
<COMPONENT>Record Class......................................................................................................................67
Virtual Table Access Classes..............................................................................................................................68
<COMPONENT>AccessGen Class...............................................................................................................69
<COMPONENT>Access Class......................................................................................................................69

Iron Speed Base Classes ..................................................................................................................... 70


Page Class ..........................................................................................................................................................71
BasePage class .............................................................................................................................................71
User Interface Control Classes ...........................................................................................................................77
Database Classes ...............................................................................................................................................77
Record Classes..............................................................................................................................................77
BaseRecord base class .................................................................................................................................78
PhysicalRecord base class ............................................................................................................................79
VirtualRecord base class ...............................................................................................................................81
Utils Classes base class ................................................................................................................................83
TableAccess base class ................................................................................................................................83
PhysicalTableAccess base class...................................................................................................................84
VirtualTableAccess base class ......................................................................................................................86
Field Classes.......................................................................................................................................................87
Validator Classes ................................................................................................................................................88
BaseIronSpeedValidator base class..............................................................................................................91
BooleanValidator base class .........................................................................................................................92
CompareValidator base class ........................................................................................................................93
CountryValidator base class ..........................................................................................................................94
CreditCardDateValidator base class..............................................................................................................94
CreditCardNumberValidator base class ........................................................................................................95
CurrencyValidator base class ........................................................................................................................95
CustomValidator base class ..........................................................................................................................96

z Page 260

DateTimeValidator base class .......................................................................................................................97


EmailValidator base class..............................................................................................................................97
FieldValueValidator base class......................................................................................................................97
FileValidator base class .................................................................................................................................98
ImageValidator base class.............................................................................................................................98
NumberValidator base class ..........................................................................................................................99
PasswordValidator base class .......................................................................................................................99
PercentageValidator base class ..................................................................................................................100
RangeValidator base class ..........................................................................................................................100
RecordControlCustomValidator base class .................................................................................................101
RegularExpressionValidator base class ......................................................................................................102
RequiredFieldValidator base class ..............................................................................................................103
ShortDateValidator base class ....................................................................................................................104
URLValidator base class..............................................................................................................................104
UsaPhoneNumberValidator base class .......................................................................................................105
UsaStateValidator base class ......................................................................................................................105
UsaZipCodeValidator base class.................................................................................................................105
Filter Classes ....................................................................................................................................................106
BaseFilterControl base class .......................................................................................................................108
CategoryFilterControl base class.................................................................................................................108
DateFieldValueFilterControl base class.......................................................................................................109
FieldSortControl base class .........................................................................................................................110
FieldValueFilterControl base class ..............................................................................................................110
PagingControl base class ............................................................................................................................112
SearchTextControl base class .....................................................................................................................113

Transaction Management .................................................................................................................. 114


Transaction Model.............................................................................................................................................114
Generated SQL Statements..............................................................................................................................115
Binary Data Type Limitations for Microsoft SQL Server ..............................................................................115
Sql_variant Support in Microsoft SQL Server ..............................................................................................116
SQL Query Performance .............................................................................................................................116
Database Stored Procedures............................................................................................................................116
Transact-SQL Stored Procedures for Microsoft SQL Server.......................................................................118
Database Views ................................................................................................................................................122
Primary Key Use ...............................................................................................................................................124
Foreign Key Use ...............................................................................................................................................125
Concurrency Control .........................................................................................................................................126
Pessimistic Concurrency..............................................................................................................................128
Optimistic Concurrency................................................................................................................................128
Concurrency Handling in Generated Applications.......................................................................................129
Cursor Management .........................................................................................................................................129
Sorting Collation Sequences.............................................................................................................................130
Full-Text Search................................................................................................................................................131
ADO DataSets...................................................................................................................................................132
.NET Data Application Blocks ...........................................................................................................................132

Exception and Error Management .................................................................................................... 133


User Input Validation Errors ..............................................................................................................................133
Internal Errors ...................................................................................................................................................133

z Page 261

Database Exception Errors ...............................................................................................................................133


Application Logic Errors ....................................................................................................................................134
Event Logging ...................................................................................................................................................134

Application Security Management .................................................................................................... 135


User Authentication and Access Control for .NET............................................................................................135
Implementing Windows Authentication with .NET Impersonation ....................................................................137
Automatic Sign-Out ...........................................................................................................................................139
Data Transmission Encryption ..........................................................................................................................139
Active Directory and LDAP................................................................................................................................139
Password Storage.............................................................................................................................................140
Firewall Security................................................................................................................................................140
Handling SQL Injection Attacks ........................................................................................................................141
Other Security-Related Materials......................................................................................................................141

Scalability and Performance.............................................................................................................. 142


Session Management .......................................................................................................................................142
Running Applications on Multiple Servers ........................................................................................................142
Concurrent Users ..............................................................................................................................................143
Improving Application Performance ..................................................................................................................143

Web.config Configuration File........................................................................................................... 144


appSettings Element .........................................................................................................................................145
Run-Time Configuration Elements....................................................................................................................151
Switching Between .Net Framework 1.0 and 1.1 ..............................................................................................152

Compatibility Between Professional and Enterprise Editions ....................................................... 153

z Page 262

INTEGRATING CUSTOM CODE WITH YOUR APPLICATION


Modifications are made in a convenient and safe way that permits frequent application regeneration without
reintegrating your code extensions. Using Iron Speed Designer, you can:

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.

Integrate with other applications.

Iron Speed Designer provides a variety of tools to accomplish these tasks.


You can add custom application logic to your application at any time. Iron Speed Designer provides mechanisms for
customizing your application at two distinct levels:

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

Code Generation Tags


and component properties

Best for: Creating sophisticated page layouts with database-connected


components, such as tables, records, fields, and filters.
Not good for: Changing any aspect of the application-wide look-and-feel,
such as colors, fonts, or styles.

Design Themes

Best for: Changing the application-wide HTML generated for each


database-connected control, such as tables, records, fields and filters.
Not good for: Laying out individual pages, except at the page theme
level.

Style sheets

Best for: Changing application-wide stylistic elements, such as colors and


fonts.
Not good for: Creating database-connected components, such as tables,
records, fields and filters.

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.

Source code (Visual Basic)

Best for: Many types of behavioral changes, including custom business


logic and third-party application integration, using safe classes.
Not good for: Most types of layout changes.

z Page 264

ARCHITECTURE OF GENERATED APPLICATIONS


Iron Speed Designer generates fully working, web-based applications, following the three-tiered architecture favored
by most enterprise-class application developers:
Iron Speed Designer generates a
complete three-tier application.

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:

Tier 1: The Presentation Layer

Tier 2: The Application Layer (Business Objects)

Tier 3: The Database Layer

Application Compilation and Configuration Tools

z Page 265

Tier 1: The Presentation Layer


Iron Speed Designer generates ASPX web pages and ASCX controls. The ASCX controls use server-side codebehinds, which separates the presentation layer from the server-side application code.
Generated .NET Pages
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.
Generated .NET Controls
In .NET specific terms, Iron Speed Designer generates user controls that inherit indirectly from Microsoft's standard
UserControl class which use the pre-created custom controls instead of using the standard .NET controls. This allows
you to modify or extend the pre-created custom controls provided by Iron Speed Designer.

Tier 2: The Application Layer (Business Objects)


Much of the generated functionality in the Application Layer is a set of Visual Basic .NET classes for page
management, database access, and data validation. This code also includes Iron Speed base classes supplied by
Iron Speed for a variety of application functions. Many of the generated classes inherit from the Microsoft .NET
framework classes to provide advanced user interface controls and server management.
Adding your own application logic to applications generated by Iron Speed Designer is easy. Iron Speed Designer
generates applications that are specifically designed to support code modifications, and your application can be built
repeatedly without re-integrating your code extensions. This is accomplished using a class hierarchy in the
application, which has set of safe classes expressly for code integration that is not affected by application
regeneration.
Iron Speed Designer generates the underlying safe classes for your application only once, typically the very first time
each page is generated. Once the individual safe class for a page has been created the first time, it is never
overwritten. Thus, it is safe to add your own code to and modify these safe classes.

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.

Tier 3: The Database Layer


Iron Speed Designer generates all the SQL statements and queries needed for storing, retrieving, and filtering data
from the database. Specifically, SQL queries are generated for selecting, adding, updating and deleting records into
designated tables as well as to provide tabular reports. Iron Speed Designer will even generate complex queries
including multi-table joins with one-to-many and many-to-many 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.

Application Compilation and Configuration Tools


In addition to the source code and components generated for your three-tiered application, Iron Speed Designer also
generates various project files useful for customizing your application using Visual Studio .NET, and files to compile,
configure and run your application. These files include:

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.

Each of these layers is described in more detail in the following chapters.

z Page 268

APPLICATION FOLDER ORGANIZATION


Iron Speed Designer generates your applications source code and related files in a well-organized file system
hierarchy. You can specify the application folder where the source code is generated as well as the subdirectories
where the web pages are created. Each applications application folder can be located anywhere on your hard disk.
You can create a virtual folder in Microsoft IIS to point to the application folder.
The project directories contain both the generated source code and the files needed by Iron Speed Designer to
manage the project. Each of these directories and their respective contents are described in the following sections.
The following conventions are used in the directories described below:

<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

Files generated by Iron Speed Designer

Files provided for convenience

Files generated by Iron Speed Designer


File

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

This XML-based file contains links (URLs) to resources providing


discovery information for an XML Web service.

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

This page redirects the application user to a default page specified in


the Web.config file.
You can also modify this file to send the application user to a specific
page within the application.

IronSpeedWebForm.js

Contains JavaScript utility functions used by the application to handle


the Enter key on a web page, and to handle the focus on a control on
the web page.

z Page 270

File

Function

IronSpeedWebUIValidation.js

Client-side validation is performed by a set of JavaScript functions.


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.

Web.config

The applications configuration file used by .NET and by the


application. This file is copied from:
\<Application Folder>\Source
each time your application is generated. You should make most of
your configuration changes to the Web.config file in the Source
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.

Files provided for convenience


File

Function

AssemblyInfo.vb

This project information file (AssemblyInfo.vb or AssemblyInfo.cs file) contains


metadata about the assembly (DLL) in a project, such as name, version, and
culture information.

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

This DLL contains your applications compiled code. It is the .NET


assembly generated by compiling all of the Visual Basic .NET files in your
application.
<APP Name>.DLL does not contain the applications ASPX page files,
ASCX user control files, CONFIG files, etc. Those files must reside on the
file system, because the Microsoft IIS web server compiles them at run
time.

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

These system messages are used by the application at run-time for


logging error messages and events into the Windows Event Viewer and
for other system-level uses. These strings are retrieved from
BaseClasses.resx by the application at run-time.
Examples:
BaseClasses.es-PA.resx
BaseClasses.en-US.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

Record classes (.vb)

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

Table Access classes


(.vb)

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.

Table Definition class


(.vb)

The application uses the table schema information of a database table to


access, update and delete data from the applications database tables. The
schema information is stored in a class generated by Iron Speed Designer.
The generated class is called <Table>Definition and is created in a file called
<Table>Definition.vb.
This generated class is overwritten whenever the table schema information
changes as a result of refreshing a database table schema. There is no safe
class created for this class as it does not typically need to be modified by you.

SQL Interface class (.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.

For more detail, see:

Data model class-related files

Example: An Orders Table

z Page 274

Data model class-related files


The following are database class-related files. A set of six files is generated for each table and each joined table.
File Name

Description

<TABLE>Record.gen.vb

The record object base class named <TABLE>RecordGen.

<TABLE>Record.safe.vb

The record object safe class named <TABLE>Record.

<TABLE>Access.gen.vb

Table access object base class named <TABLE>AccessGen.

<TABLE>Access.safe.vb

Table access object safe class named <TABLE>Access.

<TABLE>Definition.vb

The table schema information class named <TABLE>Definition.

<TABLE>SqlAccess.gen.vb

The SQL interface class named <TABLE>SqlAccessGen used to call the


generated stored procedures.

Example: An Orders Table


For example, a table called "Orders" will get the following data access files generated for it. Files that are designated
as safe are safe to be modified. Iron Speed Designer will not overwrite these files.
Record files
OrdersRecord.gen.vb
OrdersRecord.safe.vb

Table Access files


OrdersAccess.gen.vb
OrdersAccess.safe.vb
OrdersSqlAccess.gen.vb
OrdersDefinition.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

ASPX pages (.aspx)

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.

ASCX controls (.ascx)

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.

Code-behind Safe Classes


(.safe.aspx.vb, .safe.ascx.vb)

These are the safe code-behind classes for the page.


Since these safe classes are generated only once, it is safe to include
custom application logic within them without fear of them being
overwritten.

Example: An Add Order Page


For example, if you create a web page called AddOrder, the following web files will be generated for it. Files that are
designated as safe are safe to be modified. Iron Speed Designer will not overwrite these files.

z Page 276

Add Record Page files


AddOrder.aspx
AddOrder.gen.aspx.vb
AddOrder.safe.aspx.vb

Add Record Control files


AddOrderRecord.ascx
AddOrderRecord.gen.ascx.vb
AddOrderRecord.safe.ascx.vb

...\<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 ASCX control is named as <Control>.ascx.

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

The default button control used by the web pages.

Footer

The default footer control used by the web pages.

Header

The default header control used by the web pages.

Menu

The default menu control used by the web pages.

Menu_Item

The default menu item control used by the web pages.

z Page 277

Control

Function

Menu_Item_Highlighted

The default highlighted menu item control used by the web pages.

Pagination

The default pagination control used by the web pages.

Range_Filter

The default range filter control used by the web pages.

Search

The default search control used by the web pages.

...\<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

The files Forbidden.aspx its code-behind files are generated by Iron


Speed Designer in this folder.

Internal_Server_Error.html

This page is displayed when there is an internal error or the requested


page does not exist. If you wish to change this page to a different page,
change the Web.config file by changing the customErrors section.

Show_Error.aspx

When creating an application, Iron Speed Designer generates a page


called Show_Error.aspx in this folder. This page is displayed when there
is an error on one of the pages generated by Iron Speed Designer.

SignIn.aspx

When creating an application, Iron Speed Designer generates a page


definition called SignIn.aspx in this folder. This page is displayed when
the application user requests to sign in to the application.

SignedOut_Confirmation.aspx

When creating an application, Iron Speed Designer generates a page


definition called SignedOut_Confirmation.aspx in this folder. This page is
displayed when the application user signs out from an application.

...\<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

<APP NAME >.<CULTURE>.resx

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

<Web Page Name>.html

The HTML layout page file containing code generation tags for the web
page.

<Web Page Name>.xml

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

The Styles file to use for your application.

...\<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

The database stored procedures generated to access the


database table.
Examples:
pOMSEmployeesAdd.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

An executable file to load the stored procedures into the


database. This executable file can be used during the
Copy and Run operation when you are moving the
application to a different location. You must supply the
database name, the user name and password and
additional information about the stored procedures.

...\<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 DESIGNER FILE FOLDER ORGANIZATION


The folder where Iron Speed Designer is installed contains a number of subdirectories and files that may be useful
when modifying applications. These files include the Iron Speed Base Classes, Design Theme files and files to
generate an application.
The following conventions are used in the directories described below:

Iron Speed Folder is the folder name where you installed Iron Speed Designer and the base classes.

...\<Iron Speed Folder>\Designer


The Designer folder and its subfolders contain the ASPX and ASCX files necessary to run Iron Speed Designer. In
general, you should not change any of the files in this folder with the exception of the files shown below. Only the
compiled DLL files are provided for Iron Speed Designer.
File

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.

...\<Iron Speed Folder>\Designer\Bin


The Bin folder contains the compiled library files used by Iron Speed Designer. Iron Speed Designer also uses some
third-party libraries to support its user interface which are stored in this folder.

...\<Iron Speed Folder>\Designer\Globalization\Resources


This sub-folder is a pseudo-application folder. It contains files that are common to all applications generated by Iron
Speed Designer. When Iron Speed Designer creates a new application, the contents of this folder are copied to the
new applications folder. Then the names and contents of certain files are changed to match the new applications
data (e.g. application name). In addition to the files that are copied, this folder contains a number of empty subdirectories that are needed by the application.
This folder contains the .resx string resource files for all uiCultures for all of the Iron Speed Designer applications
installed on your system. For each uiCulture, there are two files: BaseClasses.<UICULTURE>.resx and
ProjectTemplate.<UICULTURE>.resx. Iron Speed Designer automatically adds files to the Globalization\Resources
folder in these cases:

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.

...\<Iron Speed Folder>\Designer\Page Templates


This folder contains the set of page template files for a particular design theme that can be used by your layout pages.
When you create a layout page using the Application Builder, you can select the type of the page and the design
theme to use. A customized layout per your instructions is created based on the page template.
There are six types of page templates available in Iron Speed Designer.
Page Template Type

Description

Add Record Page

A page template to create Add Record pages. The Add Record page can also add
records in detail tables using a master-detail relationship.

Edit Record Page

A page template to create Edit Record pages. The Edit Record page can also edit
records in detail tables using a master-detail relationship.

Edit Table Page

A page template to create editable tables.

Other Pages

A Other pages such as Sign-In and Sign-Out. There is typically no special


processing done on these pages. If you have generic page templates, you can
place them here.

z Page 284

Page Template Type

Description

Show Record Page

A page template to create Show Record pages. The Show Record page can also
show records in detail tables using a master-detail relationship.

Show Table Page

A page template to display data from a database in a tabular form.

...\<Iron Speed Folder>\IronSpeedBase


This sub-folder contains the Visual Basic .NET source code and the Visual Studio .NET development files for the Iron
Speed base classes. These classes are provided to you in source code format so you have 100% of the source code
needed for your application. You can modify the source code, create a new version of the compiled library and move
the resulting .DLL (and .PDB) to the Bin folder of the application. This enables you to have different applications
running different versions of the base classes.
Note: If you modify the base classes for your application, then you will need to merge the updates to the base classes
in future versions.
The base class file system structure mirrors the base class namespaces. That is, files in the IronSpeed.Base
namespace are in ...\<Iron Speed Folder>\IronSpeedBase\Base. Files in the IronSpeed.Base.Web.UI namespace are
in \<Iron Speed Folder>\IronSpeedBase\Web\UI.
File

Function

AssemblyInfo.vb

This project information file (AssemblyInfo.vb or AssemblyInfo.cs file) contains


metadata about the assemblies in a project, such as name, version, and culture
information.

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.

For more details, see:

...\<Iron Speed Folder>\IronSpeedBase\Bin

...\<Iron Speed Folder>\IronSpeedBase\Configuration

...\<Iron Speed Folder>\IronSpeedBase\Data

z Page 285

...\<Iron Speed Folder>\IronSpeedBase\Data\Columns

...\<Iron Speed Folder>\IronSpeedBase\Data\DataReader

...\<Iron Speed Folder>\IronSpeedBase\Data\SQLProvider

...\<Iron Speed Folder>\IronSpeedBase\obj

...\<Iron Speed Folder>\IronSpeedBase\Utils

...\<Iron Speed Folder>\IronSpeedBase\Bin


This sub-folder contains the compiled library for Iron Speed base classes produced by Microsoft Visual Studio .NET. If
you change the base classes and re-compile, you can move the resulting .DLL from this folder to your applications
folder.
File

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.

...\<Iron Speed Folder>\IronSpeedBase\Configuration


The Configuration folder contains source code files that permit access to and management of various base class
configuration options.
File

Function

ApplicationSettings.vb

This file contains classes and functions that retrieve information from the
Web.config file.

DatabaseConnection.vb

This file is used by ApplicationSettings.vb to manage database connection


strings.

z Page 286

...\<Iron Speed Folder>\IronSpeedBase\Data


The Data folder contains classes that represent the data model and database schema such as Table and Record
objects.
For more details, see:

...\<Iron Speed Folder>\IronSpeedBase\Data\Columns

...\<Iron Speed Folder>\IronSpeedBase\Data\DataReader

...\<Iron Speed Folder>\IronSpeedBase\Data\SQLProvider

...\<Iron Speed Folder>\IronSpeedBase\Data\Columns


The Columns folder contains classes that define the different types of Column objects, such as String and
CreditCardNumber.

...\<Iron Speed Folder>\IronSpeedBase\Data\DataReader


The DataReader folder contains classes for constructing and modifying dynamic data queries. This includes custom
sorting, filtering, and paging.

...\<Iron Speed Folder>\IronSpeedBase\Data\SQLProvider


The SQLProvider folder contains classes that comprise the data access layer, similar to those found in the
System.Data.SQLClient namespace.

...\<Iron Speed Folder>\IronSpeedBase\obj


The obj folder contains the compiled base class files created by Visual Studio.NET according to the project
configuration settings in IronSpeedBase.vbproj. This folder is created only when you recompile the base classes using
the IronSpeedBase project file.

...\<Iron Speed Folder>\IronSpeedBase\Utils


This folder contains the Iron Speed BaseClasses equivalent of the Microsoft .NET Frameworks System.Web
namespace. This folder contains utility classes and modules used by other Iron Speed base classes.

z Page 287

File

Function

ArrayUtils.vb

Utilities for accessing and managing Array objects.

DelimitedDecoder.vb

Utility class for parsing and tokenizing string objects

FileUtils.vb

Utilities for accessing and managing File objects.

MailSender.vb

Utility functions that permit Iron Speed Designer-applications to send email


messages.

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

A class containing various Session constants.

StringUtils.vb
SystemUtils.vb

...\<Iron Speed Folder>\IronSpeedBase\Web


This folder contains the Iron Speed BaseClasses equivalent of the Microsoft .NET Frameworks System.Web
namespace.

...\<Iron Speed Folder>\ProjectTemplate


This sub-folder is a pseudo-application folder. It contains files that are common to all applications generated by Iron
Speed Designer. When Iron Speed Designer creates a new application, the contents of this folder are copied to the
new applications folder. Then the names and contents of certain files are changed to match the new applications
data (e.g. application name). In addition to the files that are copied, this folder contains a number of empty subdirectories that are needed by the application.
If you change the Iron Speed Designer base classes and would like to use the new version of the base classes for the
new applications, you should copy the BaseClasses.dll from
...\<Iron Speed Folder>\IronSpeedBase\Bin
to

z Page 288

...\<Iron Speed Folder>\ProjectTemplate\Bin


The files specified in this folder are described in the section for the application above.
File

Function

IronSpeedWebForm.js

Contains JavaScript utility functions used by the Iron Speed base classes.

IronSpeedWebUIValidation.js

Client-side validation is performed by a set of JavaScript functions. The


JavaScript functions are common across all Iron Speed Designer
applications. 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.

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.

...\<Iron Speed Folder>\ProjectTemplate\Source\Bin


This sub-folder is a pseudo-application folder. It contains files that are common to all applications generated by Iron
Speed Designer. When Iron Speed Designer creates a new application, the contents of this folder are copied to the
new applications folder. Then the names and contents of certain files are changed to match the new applications
data (e.g. application name). In addition to the files that are copied, this folder contains a number of empty subdirectories that are needed by the application.

z Page 289

GENERATED WEB PAGES


For more information, see:

Server Control Tags

Browser Compatibility

Client-Side JavaScript in Generated Pages

Table Controls and .NET DataGrid Controls

Using DHTML in Generated Pages

Register Directives and Code Generation Tags

Using Frames in Generated Web Pages

Server Control Tags


The Iron Speed base classes extend many of the .NET web controls. These controls are then generated by Iron
Speed Designer and used in the ASPX files. Iron Speed Designer generates server controls tags in the generated
ASPX and ASCX files.

"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 tags for various types of buttons:


Tag Type

Example

Standard HTML form submit button

<input type="submit" id="b" ... />

Standard .NET HTML control

<input type=submit id=b runat=server />

Standard .NET web control

<asp:Button runat="server" id="b" ... />

Iron Speed base classes custom control

<BaseClasses:Button runat="server" id="b" ... />

OMS application user control


(Application name is OMS)

<OMS:Button runat="server" id="b" ... />

z Page 290

Client-Side JavaScript in Generated Pages


Some of Microsoft's built-in .NET server controls output client-side script as part (or all) of the HTML they send to the
browser. The default client-side script is JavaScript. Some functionality of some server controls will only work if the
client's browser supports a certain level of DHTML (JavaScript, CSS, HTML DOM, etc.). If the client's browser does
not provide this support, then those features may be disabled or ignored when that browser displays the page.
However, one of the advantages of server controls is that most of the code can reside and execute on the server, so
only a tiny amount of simple JavaScript code needs to be sent to the client and supported by the client's browser. For
example, a Microsoft LinkButton web control might output the following HTML to the browser:
<a id="Button5" href="javascript:__doPostBack('Button5','')">Change</a>
This requires JavaScript to work, but it only requires very simple JavaScript, and virtually all browsers that provide any
amount of JavaScript support should be able to properly execute the client-side portion of the control's code,
regardless of the complexity of the control's server-side code.
Since Iron Speed Designers built-in controls inherit from the Microsoft web controls, it is not possible to completely
eliminate the use of JavaScript. Iron Speed Designers controls will not work properly if the browser provides no
DHTML support, but they should work properly even if the browser only provides a very minimal level of DHTML
support.
Applications generated by Iron Speed Designer use this JavaScript chiefly for client-side data validation and links to
other dynamically generated pages (post backs). Some of the JavaScript functionality relies on the standard .NET
client-side library found in the .JS files within the Aspnet_Client folder. Some of the JavaScript functionality provided
by certain Iron Speed controls relies on the .JS files found within IronSpeedWebForm.js and
IronSpeedWebUIValidation.js contained in your applications folder. You can also customize these client scripts to suit
the needs of your application.

Using DHTML in Generated Pages


DHTML (dynamic HTML) is an umbrella term for client side programming technologies, including JavaScript, browser
DOM (document object model), CSS (cascading style sheet), etc. Applications generated by Iron Speed Designer do
not use the full functionality of the DHTML model for the following reasons:

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 in Generated Web Pages


Frames and IFrames are merely a way of simultaneously displaying the results (responses) of multiple HTTP requests
in the same browser window. You can use Frames, IFrames, and popup windows, in your applications. However,
there are several technical issues to be aware of.

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.

Inter-frame interaction is not possible on the server side because:

z Page 292

HTTP requests from Frames are indistinguishable from regular Requests.

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.

Table Controls and .NET DataGrid Controls


There are three main "templated, databound controls" in .NET: the Repeater, the DataList, and the DataGrid. All three
allow you to define a user interface for an arbitrary number of data items.
The Repeater control has no "built in" layout restrictions or features; it just allows you to define what the header, item,
alternate item, separator, and footer sections look like. The DataGrid control has "built in" support for displaying data
in a table / grid. This means that you can specify things like column width and justification without worrying about
<TR> tags, <TD> tags, and HTML formatting attributes. However, it also imposes certain restrictions. For example,
every data item is automatically displayed in its own row (i.e. <TR>). When you want to build a "table" that is not
completely tabular, using the DataGrid becomes more difficult or outright unfeasible.
The table components generated by Iron Speed Designer use the .NET Repeater control internally. This allows all of
the layout commands (<TR>s, <TD>s, align=Right, etc.) to be specified together in layout page files, separate from
the data binding. This also means that Iron Speed Designer table components support semi-tabular and non-tabular
layouts, which DataGrids do not easily handle.
The DataGrid control has "built in" support for paging, sorting, and filtering, but the default support requires that you
retrieve all of the database records from the database, and then sort, paginate, and filter them in the application layer.

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.

Register Directives and Code Generation Tags


The TagName for all ASCX Register directives is based on the Name of the ASCX component/class (e.g. Button), and
not the name attribute of the GEN:Use tag (e.g. OKButton). The name attribute of a GEN:Use tag is used to derive the
ID attribute of the .NET server control tag that will replace the GEN:Use tag, but not the directive and not the TagPrefix
or TagName of the server control tag.
Several caveats apply to the generated pages:

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.

Custom HTTP Headers, Bodies, and Other Page Sections


You can add custom page headers and other web page elements to your applications web pages by adding HTML to
the pages <HEAD>, <HTML> and other sections. Do this by inserting HTML into the appropriate web page section.
For example, the following HTML causes the page to refresh itself automatically every 2 minutes (120 seconds).
<HEAD>
:
<meta HTTP-EQUIV="Refresh" CONTENT="120">
:
</HEAD>

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

Generated Page Property

<HEAD>

Head1

<HTML>

Html1

z Page 294

HTML Tag

Generated Page Property

<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

PRESENTATION LAYER CONTROL TAGS


Overview
The server-side functionality of the application is exposed to the presentation layer ASPX pages as a set of XML tags.
This chapter lists the XML elements and associated elements and attributes that are generated by Iron Speed
Designer in the ASPX pages.
The presentation layer control tags may also be used in design themes, HTML layout page files, and in any other
context where they are passed through to the final generated ASPX page.
The syntax of the presentation layer control tags is very straightforward:
<BaseClasses:TAGNAME
id="IDNAME"
runat="server"

>
</BaseClasses:TAGNAME>

Common Elements
There are several elements common to all generated presentation layer tags.
Attribute

Description

Id

The ID of the server-side control that is being called or invoked.

Runat

Indicates the location where the control is run.


Server

CSSClass

The control is run server-side in the application layer.

The cascading style sheet class name to use.

BaseClasses:Button control tag


The Button tag implements the normal clickable button functionality.

z Page 296

Attribute

Description

Text

The label to display on the button.

CommandName

The action to perform when the button is clicked.

Font-Names

The font to use for the button label.

Font-Size

The font size to use for button label.

Example
<BaseClasses:Button
id="FirstPageButton"
runat="server"
Text="|< First Page"
CommandName="Search"
Font-Names="Verdana"
Font-Size="X-Small">
</BaseClasses:Button>

BaseClasses:BasePageSettings control tag


The Through this control, the generated page passes parameters to the Iron Speed base page class.
Attribute

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>

BaseClasses:CategoryFilterControl control tag


This server control implements the Categorization control.

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

Comma-delimited list of the names of the category fields. This is used


when creating a new filter object.

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

The maximum number of subcategory values that this control will


display.

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="&lt;b&gt;All&lt;/b&gt;"
PathValueSeparatorTemplate=" ~&gt; "
SubcategoryContainerName="CFC1SubcategoryContainer"
FirstSubcategoryValueText="&lt;i&gt;Please Select&lt;/i&gt;"
MaxSubcategoryValues="2"
SubcategoryContainerLabelName="CFC1SubcategoryContainerLabel"
>
</BaseClasses:CategoryFilterControl>

BaseClasses:CompareValidator control tag


This server control compares the input values of two other server controls.

z Page 298

Attribute

Description

ErrorMessage

The error message to display if the values do not match.

ControlToValidate

The ID of the control that contains the value to be compared.

ControlToCompare

The ID of the control that contains the value to compare.

Font-Size

The font size to use.

Font-Names

The font(s) to use.

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>

BaseClasses:CustomValidator control tag


This server control performs custom client validation.
Attribute

Description

ClientValidationFunction

Name of the function to call that performs the validation.

Example
<BaseClasses:CustomValidator
ID="ImportValidator
Display="Dynamic
RunAt="Server
ClientValidationFunction="validate>
</BaseClasses:CustomValidator>

BaseClasses:DateFieldValueFilterControl control tag


This server control filters a database column content by date.

z Page 299

Attribute

Description

Field

Name of the database field on which to filter.

Operator

Boolean comparison operator symbol, such as > and <.

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="&gt;=
TimeString="00:00:00
DisplayControl="DateFieldValueFilterControl1aTextBox">
</BaseClasses:DateFieldValueFilterControl>

BaseClasses:DropDownList control tag


This server control implements a drop down list selection.
Attribute

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

How to position drop down list elements.


The values are found in style.css file located in Theme folder

Example
<BaseClasses:DropDownList
id="FieldValueFilterControl1DropDownList
runat="server
AutoPostBack="True
style="vertical-align:middle">
</BaseClasses:DropDownList>

z Page 300

BaseClasses:FieldNameLabel control tag


This tag describes the label for a field label, field value pair.
Attribute

Description

Text

Text of the label for this field.

Example
<BaseClasses:FieldNameLabel
id="V_FOREACHRecord1Label
runat="server
CssClass="field_label
Text="ReadOnlyIdentity:">
</BaseClasses:FieldNameLabel>

BaseClasses:FieldValueTextBox control tag


This control specifies a text box associated with a field.
Attribute

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>

BaseClasses:FieldValueValidator control tag


This control validates the value entered in the text box associated with a field.
Attribute

Description

ControlToValidate

The ID of the control which holds the field value

ErrorMessage

Error message to display in case of validation error

Example
<BaseClasses:FieldValueValidator

z Page 301

id="V_FOREACHRecord1ValueFieldValueValidator
runat="server
ControlToValidate="V_FOREACHRecord1Value
ErrorMessage="Invalid value for au_id.">
</BaseClasses:FieldValueValidator>

BaseClasses:FieldSortControl control tag


This server control sorts a database table using the selected field (clicked column heading).
Attribute

Description

Table

Name of the database table to sort.

Field

Field name or position number of the database table field on which to sort.

FieldSortControl

ID of the server control that initiates the sorting operation.

Example
<BaseClasses:FieldSortControl
id="V_FOREACHHeaderRow2FieldSort"
runat="server
Table="authors
Field="1
FieldSortControl="V_FOREACHHeaderRow2FieldSortButton">
</BaseClasses:FieldSortControl>

BaseClasses:HyperLink control tag


This control implements a hypertext link.
Attribute

Description

NavigateUrl

The URL to which the hyperlink points.

Example
<BaseClasses:HyperLink
id="Hyperlink1
runat="server
NavigateUrl="/App/">
HyperLink1
</BaseClasses:HyperLink>

z Page 302

BaseClasses:ImageButton control tag


This control implements an image button.
Attribute

Description

ToolTip

The tool tip text displayed when the user mouses over the image button.

CommandName

Name of the action that is executed.

RedirectUrl

The URL used when this button is pressed.

CausesValidation

Consumers

ImageUrl

True

Validation is performed.

False

Validation is not performed.

The controls that are interested in the Button click event.


parent:record

The button sends the message to the parent component


and indicates that it should be handled by the record
control contained by the parent.

parent:table

The button sends the message to the parent component


and indicates that it should be handled by the table control
contained by the parent.

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>

BaseClasses:Image control tag


This control displays an image.

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>

BaseClasses:Label control tag


This control displays a field label.
Example
<BaseClasses:Label
id="PasswordLabel
runat="server">
Enter Current Password:
</BaseClasses:Label>

BaseClasses:LinkButton control tag


This tag implements a hypertext link button.
Attribute

Description

Text

The display text for the link button.

CausesValidation

Indicates whether this causes any validation.

CommandName

Name of the action when this button is clicked.

Example
<BaseClasses:LinkButton
id="ForgotPassword"
runat="server"
Text="click here"
CausesValidation="false"
CommandName="SendPassword">
click here.

z Page 304

</BaseClasses:LinkButton>

BaseClasses:MenuLink control tag


This tag implements menu items with hyperlink capability.
Attribute

Description

NavigateUrl

The URL used for this menu item.

Text

Text to display for this menu item.

Roles

The roles permitted to access this menu item.

style

Display style, values come from Style.css.

Font-Names

The font(s) to use.

Font-Size

The font size to use.

ForeColor

Font color to use.

Font-Bold

True

Displays the text in boldface.

False

Displays the text in normal typeface.

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>

BaseClasses:NumberValidator control tag


This server control is used to validate numeric input.

z Page 305

Attribute

Description

ControlToValidate

The ID of the control whose input is validated.

MaxDecimalPlaces

The maximum number of decimal places permitted. This attribute is used if


MaxValue is not specified.

MinValue

Minimum number value.

MaxValue

Maximum number value.

ErrorMessage

Error message to display if the numeric validation fails.

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>

BaseClasses:PasswordValidator control tag


This server control validates password input.
Attribute

Description

ControlToValidate

The ID of the server control whose input is validated.

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

BaseClasses:Panel control tag


This control is used for displaying panels.
Attribute
Visible

Description
True

Indicates the panel is to be made visible to the application user.

False

Indicates the panel is not to be made visible to the application user.

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>

BaseClasses:PagingControl control tag


This tag implements the Pagination control.
Attribute

Description

FirstPageControl

ID of the control that causes the first page to be displayed.

PreviousPageControl

ID of the control that causes the previous page to be displayed.

CurrentPageControl

ID of the control that causes the current page to be displayed.

NextPageControl

ID of the control that causes the next page to be displayed.

LastPageControl

ID of the control that causes the last page to be displayed.

Example
<BaseClasses:PagingControl
id=V_FirstFilter

z Page 307

runat=server
FirstPageControl=V_FirstButton:V_Button>
</BaseClasses:PagingControl>

BaseClasses:PlaceHolder control tag


This control is used in conjunction with CategoryFilterControl to specify other associated controls.
Example
BaseClasses:PlaceHolder
id=CFC1PathControl
runat=server>
</BaseClasses:PlaceHolder>

BaseClasses:RadioButton control tag


This control implements radio button selection functionality
Attribute

Description

GroupName

Name of the radio button group

Example
<BaseClasses:RadioButton
id=RB1
runat=server
GroupName=Group1>
</BaseClasses:RadioButton>

BaseClasses:RequiredFieldValidator control tag


This server control is used to make certain field input mandatory.
Attribute

Description

ControlToValidate

The ID of the control whose input is validated.

ErrorMessage

Error message displayed if the required field value is not entered.

Example
<BaseClasses:RequiredFieldValidator
id=V_FOREACHRecord1ValueRequiredFieldValidator
runat=server
ControlToValidate=V_FOREACHRecord1Value

z Page 308

ErrorMessage=au_id value is required.>


</BaseClasses:RequiredFieldValidator>

BaseClasses:RecordControlCustomValidator control tag


This control is used to link custom validation for each record in a displayed table.
Attribute

Description

ControlToValidate

The ID of the control whose input is validated.

ErrorMessage

Error message displayed if the validation fails.

Example
<BaseClasses:RecordControlCustomValidator
id=V_FOREACHRecord1ValueRecordControlCustomValidator
runat=server
ControlToValidate=V_FOREACHRecord1Value
ErrorMessage=Invalid value for au_id.>
</BaseClasses:RecordControlCustomValidator>

BaseClasses:RecordControlImageButton control tag


This server control is used to put image button in each row of the displayed table.
Attribute
CausesValidation

Description
True

Validation is performed.

False

Validation is not performed.

CommandName

Name of the action to execute.

RedirectUrl

Page URL to use when the button is pressed.

ImageURL

Location of the image file.

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>

BaseClasses:ShortDateValidator control tag


This server control validates date input.
Attribute

Description

ControlToValidate

The ID of the control whose content is validated as a short date.

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>

BaseClasses:SearchTextControl control tag


This server control performs full-text search of a database table.
Attribute

Description

TextControl

ID of the control that holds the text value.

Example
<BaseClasses:SearchTextControl
id=V_SearchArea
runat=server
TextControl=V_SearchAreaTextBox">
</BaseClasses:SearchTextControl>

BaseClasses:TableControlRadioButton control tag


This control is used to generate radio buttons placed in each row of a table.
Attribute

Description

GroupName

Name of the radio button group.

z Page 310

Example
<BaseClasses:TableControlRadioButton
id="V_Select
runat="server
GroupName="SelectedRecord">
</BaseClasses:TableControlRadioButton>

BaseClasses:TableControlRepeater control tag


This server control repeats the record template (another control) based on the information contained in a data source.
Attribute

Description

DataSource

ADO.NET data source.

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>

BaseClasses:TableControlFieldSumLabel control tag


This tag indicates whether to perform a summation calculation on a database field.
Example
<BaseClasses:TableControlFieldSumLabel>
</BaseClasses:TableControlFieldSumLabel>

BaseClasses:TextBox control tag


This control implements text box functionality.

z Page 311

Attribute

Description

TextMode

Controls whether the text typed is echoed in the display.


Password

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>

BaseClasses:TextBoxMaxLengthValidator control tag


This server control validates the maximum length of the input text in a text box.
Attribute

Description

ControlToValidate

ID of the control to validate.

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

SPECIAL KEY AND BUTTON HANDLING


This section contains information about:

Page History (Back Button) Handling

Capturing the Enter Key in Layout Pages

Page History (Back Button) Handling


All pages generated by Iron Speed Designer use the application sessions server-side navigation history to determine
where to go when the application user clicks the back button or takes some action that has the equivalent effect.
This redirection can be applied to a variety of buttons. In general, application users are redirected back to the page
they came from unless:
1. The page they came from did was not logged in the session's server-side navigation history. This is the case
for non-IronSpeed pages (i.e. doesn't inherit from BasePage).
2. The session's server-side navigation history was modified between the previous page request and the redirect.
Some pages and controls (e.g. Login.ascx) remove the current request from the history before redirecting in
some cases.
For example, the OK and Cancel buttons on the Sign In page use the "Back" Redirect URL. After an application user
is signed in, they are redirected to the last URL in their session's server-side navigation history. If the user signs into
the application from a page within the application itself, typically a page requiring role-based security, the user is
redirected back to that page requiring the sign in. However, when an application user enters the application through a
separate URL, the user is prompted to sign in and, after signing in, the user is redirected to the application start up
page because there is no previous page within the application.

Capturing the Enter Key in Layout Pages


On most normal web pages, pressing the Enter key either has no effect or causes the browser to 'click' one of the
buttons in the page, but the button clicked is often not the one that users would think is the 'correct' button.
Some pages contain special tags that define 'capture zones' for the Enter key. Each capture zone is associated with a
specific button, and this button will be 'clicked' when the capture zone is activated. A capture zone is activated when it
detects that the Enter key is pressed inside of it. The location of the key press is determined based upon which page
element was highlighted (or last clicked) when the key was pressed. The one exception to this rule is that elements
that normally respond to the Enter key directly do not activate capture zones if they are the source of the key press.
The elements that do not activate capture zones are:

z Page 313

Text area

Select, i.e. Dropdown

Input buttons, i.e. <input type=[Submit/Button/Image/Reset]

Anchors, i.e. <a> tags.

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).

Page Size textboxes activate the button next to them.

Search text boxes activate the button next to them.

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

GENERATED APPLICATION LAYER CLASSES


In the application layer, applications generated by Iron Speed Designer are comprised of Visual Basic .NET classes
and code-behinds. The Visual Basic .NET classes generated by Iron Speed Designer are themselves sub-classed
from the Microsoft .NET Framework classes and from the Iron Speed base classes. (The Iron Speed base classes are
described elsewhere in this Guide.)
Iron Speed Designer generates these class types:

Page. A code-behind class is generated for each page in your application.

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

Table Access Classes

Virtual Record Classes

z Page 316

Virtual Table Access Classes

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.

For more detail, see:

<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

Protected WithEvents Declarations


Protected WithEvents declarations allow event handler methods to be associated with the declared server controls'
server-side events. These associations are established by using the Handles keyword and the declared WithEvents
variable in the declaration(s) of eligible methods.
All server control tags in an ASPX/ASCX have a "Protected WithEvents" declaration in the code behind, except:

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.

Table Access Classes


The Table Access class is one of the workhorse classes for Iron Speed Designer applications. This 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. A Table Access class is defined for each database table used in the
application.
Use the TableAcces 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 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

Returns the record based on an ID specified as an argument. The second argument


is bMutable for this method. If the bMutable is True, then the data in the record can
be modified, and modifications to the record will be updated in the database.
The actual update to the database happens when the transaction is committed as part
of completing the changes on the page.

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.

Virtual Record Classes


When multiple tables are joined together, a class derived from the VirtualRecord class is generated. The virtual record
class allows your application to access fields from any of the database tables that were joined together. For example,
if an Order table was joined with the Customer and Product tables, the Virtual Record class or any of its derived
classes will support the ability to access any of the fields of the three records.
The primary reason for generating a class, instead of using Virtual Record itself, is to create a set of methods that are
specific to the joined 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.
Use the Virtual Record classes to modify the data
access logic aspects of your application.

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

For more detail, see:

<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.

Virtual Table Access Classes


The Virtual Table Access class provides the methods necessary to retrieve a group of joined records based on your
filtering criteria and end-user filtering criteria. A sub-class of VirtualTableAccess class is generated for each table join
you specify. For example, if your application has a table component showing the Order, Product and Customer tables
joined, Iron Speed Designer will generate a VirtualTableAccess class for the component. This class is derived from
the VirtualTableAccess class. The primary reason for generating a class, instead of using VirtualTableAccess itself, is
to create a set of methods that are specific to the database table. This makes the application more understandable
and easier to maintain.
Use the VirtualTableAccess classes to modify the
data access logic aspects of your application.

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

Creates a new VirtualTableAccess class by calling the base method.

<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

Class Name: <COMPONENT>Access

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

IRON SPEED BASE CLASSES


The Iron Speed base classes provide certain application functionality to your Iron Speed Designer-applications. The
Iron Speed base classes include important user interface building blocks and database management features that are
critical to secure, reliable systems, but can be cumbersome to build.
Iron Speed saves you the time and distraction of re-creating these features for each application.

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

This method enforces the role-based security mechanism. It checks to ensure


that the application has access to the page based on the settings specified by you
in the Designer.

GetCustomizedPagePath

This is called by the RedirectToCustomizedPage method to retrieve the path of a


page in the application.
This method is not currently used.

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

This method is typically overridden by the generated sub-classes to retrieve a set


of records from the database.
This method implements the GetTable method of the
IRecordComponentContainer interface.

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

This method de-serializes the specified String into a ViewState object

LogUnhandledException

This method calls the LogIronSpeedEvent function to log an unhandled exception.


The logs can be viewed by using the Windows Event Viewer.

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

This event handles the completion of the creation or editing


of one or more data records. The updateData method on this
class is called followed the transaction commit to commit the
transaction to the database.

ResetData

This event handles the case where a Reset button is pressed


on a web page to retrieve the original values from the
database. This event calls the default DataBind method to
re-bind the data.

LogOut

Logs the user out by calling the logout method of this class.

This method implements the OnIronSpeedEvent method of the IEventConsumer


interface.
Page_Init_InitSystem

This method is not currently used.

Page_Init_RedirectToCustomize
dPage

This method is not currently used.

Page_Load_InitPageSettings

This method is not currently used.

Page_PreRender_DataBindOnP
ostBack

This method is not currently used.

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

This method is not currently used.

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

The method is called by EnforceAccessRequirements whenever a determination


is made that a page cannot be accessed by the user because of security settings.
The forbidden page displays an error message that a page cannot be viewed
because of security settings.

RedirectToLoginPage

This method is called from EnforceAccessRequirements after checking to see if


login is required. This method redirects to the login page of the application.

RedirectToSSLPage

This method is called by EnforceAccessProtocol to redirect the application user to


a secure page using SSL and HTTPS.

RegisterClientScript

Some of the user validation is performed by a series of JavaScript functions. This


registers the functions with the browser. Please see the description of the
validation classes for more details about this method.

RemoveCurrentRequestFromSe
ssionNavigationHistory

This method is not currently used.

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

User Interface Control Classes


This information is not available at this time.

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

Utils Classes base class

BaseRecord base class

TableAccess base class

PhysicalRecord base class

PhysicalTableAccess base class

VirtualRecord base class

VirtualTableAccess base class

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.

BaseRecord base class


The BaseRecord class is the base class from which both PhysicalRecord and VirtualRecord are derived. It represents
a record in a database table, view or a joined table as a result of a query. The record is part of a collection of one or
more records specified in the Table Utils class. This class provides the basic methods common to both the
PhysicalRecord and VirtualRecord classes. This class cannot be instantiated directly; instead only derived classes
can be instantiated. All classes that reference the database derive classes from this class.
Inherits From

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

Determines if this record is read-only or can be updated in the database. This


method must be overridden by the sub-classes of BaseRecord.

setString

Calls setValue to set the string value of a field.

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.

PhysicalRecord base class


The PhysicalRecord class derives from the BaseRecord class and represents a record from the database. This class
represents a record that can be updated in the database since it has a one-to-one correspondence to a database.
Inherits From

BaseRecord

Interfaces

None

z Page 336

In following methods are defined for the PhysicalRecord class:


Method

Description

CopyRecord

Makes a copy of the current record and returns it.

create

Creates a new record and initializes it. If the record supports workflow, the
record is set to the first workflow state.

deleteRecord

Removes this record from the database.

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

Returns the ID of the record.

getIdAsSqlType

Returns the ID as a SQL type.

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

Determines if this record is read-only or can be updated in the database.

New

Creates a new PhysicalRecord class.

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.

VirtualRecord base class


The VirtualRecord class derives from the BaseRecord class and represents a record that is the result of a join of
multiple tables from a database. This class represents a record that cannot be updated in the database since it does
not represent a specific record in the database.
Inherits From

BaseRecord

Interfaces

None

In following methods are defined for the VirtualRecord class:


Method

Description

IsReadOnly

Determines if this record is read-only or can be updated in the database.

New

Creates a new PhysicalRecord class.

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

Removes this record from the database.

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

Makes a copy of the current record and returns it.

getIdAsSqlType

Returns the ID as a SQL type.

getId

Returns the ID of the record.

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.

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

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.

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

Utils Classes base class


The Utils classes represent a set of records from the database or the result of a table join. The set might contain one
or more records returned as part of a query. These classes provide methods to query, retrieve, display and update the
records in a database. These classes also follow an inheritance model similar to the Record classes described above.

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.

TableAccess base class


The TableAccess class is the base class from which both PhysicalTableAccess and VirtualTableAccess are derived. It
represents a set of records in a database table, view or a joined table as a result of a query. This class provides the
basic methods common to both the PhysicalTableAccess and VirtualTableAccess classes. This class cannot be
instantiated directly; instead, only derived classes can be instantiated. All classes that reference the database derive
classes from this class.
Inherits From

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

The following methods are defined for the TableAccess class:


Method

Description

getInstance

Returns an object that is the instance of this class.

Equals

Compares two sets of records to see if they are the same.

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

PhysicalTableAccess base class


The PhysicalTableAccess class derives from the TableAccess class and represents a set of records from the
database. This class represents records that can be updated in the database since they have a one-to-one
correspondence to a database.
Inherits From

TableAccess

Interfaces

None

The following methods are defined for the PhysicalTableAccess class:


Method

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

Column sorting alphabetical sorting in ascending or descending order.

Pagination next page, previous page, first page, last page.

Page size number of records displayed per page.

Search searching for a text string in any of the fields whether


displayed or not.

Filter narrowing the search to a set of values based on one or more


filters.

Returns the instance of the record.

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

Creates a new instance of PhysicalTableAccess class.

VirtualTableAccess base class


The VirtualTableAccess class derives from the TableAccess class and represents a set of records from the database.
This class represents records that are derived by specifying a table join to join multiple tables from a database. These
records cannot be updated in the database since they do not have a one-to-one correspondence to a database table.
Inherits From

TableAccess

Interfaces

None

The following methods are defined for the VirtualTableAccess class:


Method

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

Column sorting alphabetical sorting in ascending or descending order.

Pagination next page, previous page, first page, last page.

Page size number of records displayed per page.

Search searching for a text string in any of the fields whether


displayed or not.

Filter narrowing the search to a set of values based on one or more


filters.

getRecordInstance

Returns the instance of the record.

getStats

Returns a string indicating the current page number out of the total number of
pages based on the records currently being displayed.

New

Creates a new instance of VirtualTableAccess class.

Field Classes
No additional information is available at this time.
Microsoft SQL Server Type

Iron Speed Designer


Field Class

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

BaseIronSpeedValidator base class


The BaseIronSpeedValidator class inherits from the System.Web.UI.WebControls.BaseValidator class in the .NET
Framework. This class is the base class used by most of the other validators provided in the Iron Speed base classes.
Inherits From

System.Web.UI.WebControls.BaseValidator

Interfaces

IValidatorComponent

Method

Description

ClientValidationFunction

Access method to get or set the ClientValidationFunction property of the


base class. The ClientValidationFunction is used to validate the actual
value. Typically, this is the JavaScript function used to validate the values
entered by the user on a web page.
Setting the EnableClientScript property of the Validator to False can turn
off client-side validation. By default, the Microsoft .NET Framework sets
this property to True.

GetControlToValidate

This method is implemented on the IValidatorComponent interface. It


returns the control to be validated and is used by the GetValueToValidate
method.

GetValueToValidate

This method is implemented on the IValidatorComponent interface. It


returns the value to be validated and is used by the derived classes to
determine if the value is valid.

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

This method is the public version of the protected EvaluateIsValid


method. It calls the protected version of the method of the derived class.

z Page 348

Method

Description

RegisterClientScript

This method adds a client-side JavaScript validation method to the


generated page. The JavaScript validation function calls the appropriate
validation method in the derived classes to validate the values. Clientside validation helps keep reduce the load on the server.

RegisterErrorMessageScript

This method registers the Javascript error message script.

For more detail, see:


RegularExpressionValidator base
class

BaseIronSpeedValidator base class

EmailValidator base class

BooleanValidator base class

FieldValueValidator base class

CompareValidator base class

FileValidator base class

CountryValidator base class

ImageValidator base class

CreditCardDateValidator base class

NumberValidator base class

CreditCardNumberValidator base class

PasswordValidator base class

UsaPhoneNumberValidator base
class

CurrencyValidator base class

PercentageValidator base class

UsaStateValidator base class

CustomValidator base class

RangeValidator base class

UsaZipCodeValidator base class

DateTimeValidator base class

RecordControlCustomValidator base
class

RequiredFieldValidator base class


ShortDateValidator base class
URLValidator base class

BooleanValidator base class


The BooleanValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate a Boolean value entered by a user or upon import.
The following methods are implemented for BooleanValidator:
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

Retrieves the value to validate using the GetValueToValidate method and

z Page 349

Method

Description
validates the value. If there is no value provided, the validator returns True.

CompareValidator base class


The CompareValidator control validates data values in the SelectionList or TextBox control. The Iron Speed base
classes do not currently use this, but is provided for completeness in case you would like to add additional functionality
to the Iron Speed base classes.

Inherits From

System.Web.UI.WebControls.CompareValidator

Interfaces

IValidatorComponent

The following methods are implemented for CompareValidator:


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.

GetValueToValidate

This method is implemented on the IValidatorComponent interface. It returns


the value to be validated and is used by the derived classes to determine if the
value is valid.

GetControlToValidate

This method is implemented on the IValidatorComponent interface. It returns


the control to be validated and is used by the GetValueToValidate method.

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.

CountryValidator base class


The CountryValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate a country name entered by a user or upon import.
The following methods are implemented for CountryValidator:
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

Retrieves the value to validate using the GetValueToValidate method and validates
the value. If there is no value provided, the validator returns True.

CreditCardDateValidator base class


The CreditCardDateValidator class inherits from the BaseIronSpeedValidator class and provides the validation
functionality necessary to validate a credit card date entered by a user or upon import. Credit card dates are specified
as month and the year of expiration of the credit card.
The following methods are implemented for CreditCardDateValidator:
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

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

CreditCardNumberValidator base class


The CreditCardNumberValidator class inherits from the BaseIronSpeedValidator class and provides the validation
functionality necessary to validate a credit card number entered by a user or upon import. Credit card numbers can be
12 to 16 digits long and contain a check-digit.
The following methods are implemented for CreditCardNumberValidator:
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

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.

CurrencyValidator base class


The CurrencyValidator class inherits from the NumberValidator class and provides the validation functionality
necessary to validate currency amounts. In addition to check whether the number is valid, this validator supports
checking for minimum and maximum values. The validator can also check to see the number of digits specified after
the decimal point.
The following methods are implemented for CurrencyValidator:
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

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

CustomValidator base class


The CustomValidator control is used to add custom validation to the user interface controls. This is not used currently
by the Iron Speed base classes, but is provided for completeness in case you would like to add additional functionality
to the Iron Speed base classes.

Inherits From

System.Web.UI.WebControls.CustomValidator

Interfaces

IValidatorComponent

The following methods are implemented for CustomValidator:


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.

GetValueToValidate

This method is implemented on the IValidatorComponent interface. It returns


the value to be validated and is used by the derived classes to determine if the
value is valid.

GetControlToValidate

This method is implemented on the IValidatorComponent interface. It returns


the control to be validated and is used by the GetValueToValidate method.

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

DateTimeValidator base class


The DateTimeValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate a date and time entered by a user or upon import. The validator supports checking for just a
date instead of a combination of data and time.
The following methods are implemented for DateTimeValidator:
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 time.

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
date. If the AllowTime Boolean flag is set to True, the value is also checked to
make sure it contains a valid time.

AllowTime

Sets a Boolean flag to determine if time is allowed in addition to the date.

EmailValidator base class


The EmailValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate whether the email address has a valid syntax.
The following methods are implemented for EmailValidator:
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

Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.

FieldValueValidator base class


The FieldValueValidator class inherits from the System.Web.UI.WebControls.BaseValidator class and provides the
validation functionality necessary to validate field values. The FieldValueValidator determines the type of field and
calls the appropriate validation function to validate the data.

z Page 354

Inherits From

BaseIronSpeedValidator

Interfaces

IValidatorComponent

The following methods are implemented for FieldValueValidator:


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

Retrieves the value to validate using the GetValueToValidate method and calls the
PublicEvaluateIsValid method for validation.

FileValidator base class


The FileValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate a file name.
The following methods are implemented for FileValidator:
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

Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.

ImageValidator base class


The ImageValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate an image.
The following methods are implemented for ImageValidator:
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.

z Page 355

Method

Description

EvaluateIsValid

Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.

NumberValidator base class


The NumberValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate a number entered by a user or upon import. In addition to check whether the number is valid,
this validator supports checking for minimum and maximum values. If the number is a decimal number, the validator
can also check to see the number of digits specified after the decimal point.
The following methods are implemented for NumberValidator:
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 minimum and
maximum values and maximum decimal places.

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
number and also compared with the minimum and maximum allowed for the
number. The number is also checked to see if it is within the maximum
number of decimal places allowed for this number.

MinValue

Sets the minimum value to be validated against.

MaxValue

Sets the maximum value to be validated against.

MaxDecimalPlaces

Sets the maximum number of decimal places after the decimal point allowed
for this field.

PasswordValidator base class


The PasswordValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate a password field.
The following methods are implemented for PasswordValidator:

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

Retrieves the value to validate using the GetValueToValidate method and


checks to see if the value is valid.

MinLength

Sets the minimum length allowed of the password field.

MaxLength

Sets the maximum length allowed of the password field.

AddAttributesToRender

This method adds attributes to the generated code to check for time.

PercentageValidator base class


The PercentageValidator class inherits from the NumberValidator class and provides the validation functionality
necessary to validate a percentage field.
The following methods are implemented for PercentageValidator:
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

Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.

RangeValidator base class


The RangeValidator control is used to add range validation to the user interface controls. This is not used currently by
the Iron Speed base classes, but is provided for completeness in case you would like to add additional functionality to
the Iron Speed base classes.

z Page 357

Inherits From

System.Web.UI.WebControls.RangeValidator

Interfaces

IValidatorComponent

The following methods are implemented for RangeValidator:


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.

GetValueToValidate

This method is implemented on the IValidatorComponent interface. It returns


the value to be validated and is used by the derived classes to determine if the
value is valid.

GetControlToValidate

This method is implemented on the IValidatorComponent interface. It returns


the control to be validated and is used by the GetValueToValidate method.

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.

RecordControlCustomValidator base class


The RecordControlCustomValidator control is used to add a custom validator to a record control class. The record
control is the recommend place for you to add custom validation logic for an application. The validateData method of
the record control is called by the EvaluateIsValid method of this validator, so your validation should be added to the
validateData method of the record control.
The following methods are implemented for RecordControlCustomValidator:

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.

RegularExpressionValidator base class


The RegularExpressionValidator control is used to validate regular expressions being entered by the application user.
This is not used currently by the Iron Speed base classes, but is provided for completeness in case you would like to
add additional functionality to the Iron Speed base classes.

Inherits From

System.Web.UI.WebControls.RegularExpressionValidator

Interfaces

IValidatorComponent

The following methods are implemented for RegularExpressionValidator:


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.

GetValueToValidate

This method is implemented on the IValidatorComponent interface. It returns


the value to be validated and is used by the derived classes to determine if the
value is valid.

z Page 359

Method

Description

GetControlToValidate

This method is implemented on the IValidatorComponent interface. It returns


the control to be validated and is used by the GetValueToValidate method.

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.

RequiredFieldValidator base class


The RequiredFieldValidator control is used for any input controls that are required. This validator is attached to all the
required fields designated by you in Iron Speed Designer.

Inherits From

System.Web.UI.WebControls.RequiredFieldValidator

Interfaces

IValidatorComponent

The following methods are implemented for RequiredFieldValidator:


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.

GetValueToValidate

This method is implemented on the IValidatorComponent interface. It returns


the value to be validated and is used by the derived classes to determine if the
value is valid.

z Page 360

Method

Description

GetControlToValidate

This method is implemented on the IValidatorComponent interface. It returns


the control to be validated and is used by the GetValueToValidate method.

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.

ShortDateValidator base class


The ShortDateValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate a short date the month and year as used by credit card expiration dates.
The following methods are implemented for ShortDateValidator:
Method

Description

New

Constructor used to create the validator class.

EvaluateIsValid

Checks to see if this date is a valid date.

URLValidator base class


The URLValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate a URL.
The following methods are implemented for URLValidator:
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

Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.

z Page 361

UsaPhoneNumberValidator base class


The UsaPhoneNumberValidator class inherits from the BaseIronSpeedValidator class and provides the validation
functionality necessary to validate a U.S. Phone Number. A U.S. phone number has an area code followed by seven
digits.
The following methods are implemented for UsaPhoneNumberValidator:
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

Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.

UsaStateValidator base class


The UsaStateValidator class inherits from the BaseIronSpeedValidator class and provides the validation functionality
necessary to validate that the value is one of the 50 U.S. States.
The following methods are implemented for UsaStateValidator:
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

Retrieves the value to validate using the GetValueToValidate method and checks to
see if the value is valid.

UsaZipCodeValidator base class


The UsaZipCodeValidator class inherits from the BaseIronSpeedValidator class and provides the validation
functionality necessary to validate a U.S. ZIP Code. The validator optionally supports checking for all 9 digits.
The following methods are implemented for UsaZipCodeValidator:

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

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
date. If the IsRequires9Digits Boolean flag is set to True, the value is also
checked to make sure it contains has all 9 digits of the ZIP Code.

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.

For more detail, see:

BaseFilterControl base class

FieldValueFilterControl base class

CategoryFilterControl base class

PagingControl base class

z Page 364

DateFieldValueFilterControl base class

FieldSortControl base class

SearchTextControl base class

BaseFilterControl base class


The BaseFilterControl class is used as the base class for some of the filter controls in the Iron Speed base classes.
Inherits From

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.

The following methods are implemented for BaseFilterControl:


Method

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

Creates/updates a BaseDataReaderFilter object in the current IFilterable. The


filter is created/retrieved using a filter key created using this control's
createFilterKey() method.

CategoryFilterControl base class


The CategoryFilterControl is used to add a Yahoo-style hierarchical navigation control on the page. This class
supports both the path and the sub-category controls. The path control displays the path of categories selected to get
to current location. The sub-category control shows the next category that the application user can select from. When

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

The following methods are implemented for CategoryFilterControl:


Method

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.

DateFieldValueFilterControl base class


The DateFieldValueFilterControl is used to add a date value control on the page. This class supports an input field
that can be specified by the user to limit the records shown based on a comparison operator specified by you. To
create a date range set of two fields, two DateFieldValueFilterControls must be specified, each with a different
operator.
Inherits From

FieldValueFilterControl

The following methods are implemented for DateFieldValueFilterControl:


Method

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.

FieldSortControl base class


The FieldSortControl is used to support a column in a table. The application user can click on the column heading to
toggle between ascending and descending order for a column. The table component only shows a portion of the data
in the current query (e.g., only Page 1 of Page 50 displayed), the sorting is performed by running a query against the
database. The query returns the set of records in a database sorted based on the sorting criteria.
Inherits From

System.Web.UI.WebControls.WebControl

Interfaces

IEventConsumer
IEventProducer
IFilterComponent

The following methods are implemented for FieldSortControl:


Method

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.

FieldValueFilterControl base class


The FieldValueFilterControl is used to add a date value control on the page. This class supports an input field that can
be specified by the user to limit the records shown based on a comparison operator specified by you. To create a date
range set of two fields, two FieldValueFilterControl must be specified, each with a different operator.

z Page 367

Inherits From

BaseFilterControl

Interfaces

IEventConsumer
IEventProducer
IFilterComponent

The following methods are implemented for FieldValueFilterControl:


Method

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

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 filtered field.

getFieldValueFromDisplayControl

Gets the current field value from this control's DisplayControl.

MaxDisplayedValues

Sets the maximum number of values to be displayed in a dropdown


filter. By default this is set to 100. If the number of values displayed
are greater than 100, the first 100 values are displayed. You can
change or override this value to display more or less values in
dropdown filters.

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

Adds an event handler necessary to handle events raised by the


changes to the dropdown list.

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.

PagingControl base class


The PagingControl is used to support pagination buttons on a page. When an application user clicks on the pagination
button, an event is sent to the table view control to retrieve the next page from the database. Similarly, the paging
control updates itself when the table view is displayed or updated as a result of another filter such as searching for a
string.
Inherits From

System.Web.UI.WebControls.WebControl

Interfaces

IEventConsumer
IEventProducer
IFilterComponent

The following methods are implemented for PagingControl:


Method

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

SearchTextControl base class


The SearchTextControl is used to support full text search within a table view control.
There are two types of search controls supported by the Iron Speed base classes: a text search box where the
application can type a text string for which to search, and a set of checkboxes that specify values. A search is
performed for any of the one or more items checked.
The textbox search control supports searching based on an operator and with or without case sensitivity. By default,
the search control uses the Contains operator and performs a case in-sensitive search.
Inherits From

System.Web.UI.WebControls.WebControl

Interfaces

IEventConsumer
IEventProducer
IFilterComponent

The following methods are implemented for SearchTextControl:


Method

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.

Generated SQL Statements


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.
You do not need to know any SQL to build applications in Iron Speed Designer.
Iron Speed Designer generates SQL based on your database table and user interface design. A variety of data filters
and navigation components provide your end-users with additional viewing and reporting flexibility.
For more information, see:

Binary Data Type Limitations for Microsoft SQL Server

Sql_variant Support in Microsoft SQL Server

SQL Query Performance

Binary Data Type Limitations for Microsoft SQL Server


There are several limitations on the SQL statements that Iron Speed Designer generates:

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

Sql_variant Support in Microsoft SQL Server


The sql_variant data type in Microsoft SQL Server is used to store data of various types. Iron Speed Designer treats
sql_variant fields as binary data.
sql_variant is useful if you want to store some data but don't care about the type of the source data and don't want to
perform any explicit type conversion when setting its value. If you have other fields of type bigint, datetime, decimal,
varchar, etc., you can store their values in sql_variant fields.
For example, suppose you have a table called VariantTest with a CreateDate field of type datetime and a VariantDate
field of type sql_variant. You can do things like:
UPDATE VariantTest
SET VariantDate = CreateDate

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.

SQL Query Performance


Your ultimate per-machine performance depends largely on the complexity of the generated SQL statements in your
application and on the underlying performance and load of the database to which the application is connected.
You can greatly increase your applications performance by appropriate database table indexing. Generally, any
database table field that is used in an SQL WHERE clause should be indexed. Your database provides an easy way
to specify the fields to be indexed. The indexed fields are displayed on the Databases page in Iron Speed Designer.

Database Stored Procedures


In any database application, there is a fundamental decision as to whether to place the SQL statements in the
application layer or in the database layer. As you might expect, there are advantages and disadvantages to both.
If SQL statements are placed in the application layer, they are embedded in the applications source code itself. In this
style, the burden of writing and maintaining the SQL typically falls to the application developers, because they are the
ones writing the application source code and the best able to write and insert the SQL statements at the appropriate
places in their code. Developers can tightly integrate the SQL and the query results with their source code. However,

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

Transact-SQL Stored Procedures for Microsoft SQL Server


For each table, Iron Speed Designer generates the following stored procedures:
Transact-SQL Stored
Procedures

Purpose

<PREFIX>Add

Insert a single record in the table.

<PREFIX>Delete

Delete a single record from the table.

<PREFIX>DeleteRecords

Delete a set of records based on search criteria.

<PREFIX>DrillDown

Get a list of distinct column values based on search criteria.

<PREFIX>Export

Export records from the table based on search criteria.

<PREFIX>Get

Get a single record from the table.

<PREFIX>GetList

Get a list of records based on search criteria.

<PREFIX>GetStats

Get summarized or calculated information from a table based on search


criteria. Several possibilities including counting records, summing or
averaging values.

<PREFIX>Update

Update a single record in the table.

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

Primary key value for the newly created record generated by a


database sequence.

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

Primary key value for the record to be deleted.

<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

The number of records deleted.

Output

z Page 376

<PREFIX>DrillDown

Parameter Name

Type

Description

p_select_str

VARCHAR2

The field names to be returned. This forms the SELECT clause in


the SQL query.

p_from_str

VARCHAR2

The additional tables with which a join operation is performed. This


forms the FROM clause in the SQL query.

p_where_str

VARCHAR2

The search criteria forming the WHERE clause of the SQL query.

p_sort_str

VARCHAR2

The sorting criteria forming the ORDER BY clause of the SQL


query.

p_list

Cursor

A cursor containing the result set of the SQL query.

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

The column headings to be placed in the files header row..

p_select_str

VARCHAR2

The field names to be returned. This forms the SELECT clause in


the SQL query.

p_from_str

VARCHAR2

The additional tables with which a join operation is performed. This


forms the FROM clause in the SQL query.

p_search_str

VARCHAR2

The search criteria forming the WHERE clause of the SQL query.

p_clob

CLOB

The contents of the file being exported.

Output

z Page 377

Parameter Name

Type

Description

p_num_exported

NUMBER

The number of records exported.

Output
<PREFIX>Get

Parameter Name

Type

Description

p_id

INTEGER

The primary key of the record to be fetched.

p_cur

CURSOR

A cursor pointing to the record being fetched.

Output
<PREFIX>GetList

Parameter Name

Type

Description

p_from_str

VARCHAR2

The additional tables with which a join operation is performed. This


forms the FROM clause in the SQL query.

p_search_str

VARCHAR2

The search criteria forming the WHERE clause of the SQL query.

p_sort_str

VARCHAR2

The sorting criteria forming the ORDER BY clause of the SQL


query.

p_page_number

INTEGER

The page within the result set whose data is to be returned.

p_batch_size

INTEGER

The total number of records to be displayed in a page (table grid).

p_total_size

INTEGER

The total number of records in the result set of the SQL query.

Output
p_list

Cursor

A cursor containing the result set of the SQL query.

Output

z Page 378

<PREFIX>GetStats

Parameter Name

Type

Description

p_select_str

VARCHAR2

The field names to be returned. This forms the SELECT clause in


the SQL query.

p_from_str

VARCHAR2

The additional tables with which a join operation is performed. This


forms the FROM clause in the SQL query.

p_search_str

VARCHAR2

The search criteria forming the WHERE clause of the SQL query.

p_sort_str

VARCHAR2

The sorting criteria forming the ORDER BY clause of the SQL


query.

p_page_number

INTEGER

The page within the result set whose data is to be returned.

p_batch_size

INTEGER

The total number of records to be displayed in a page (table grid).

p_list

Cursor

A cursor containing the result set of the SQL query.

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

Primary key value for the record being updated.

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

Primary Key Use


Primary keys in database tables indicate which fields are used to uniquely identify each record. For example, a
Customer table generally has a CustomerID primary key field that contains a unique customer ID value for each
individual customer. In order to generate code that can update or delete an individual record, Iron Speed Designer
must know which field(s) to use as the primary key for selecting and accessing individual records.
Frequently, a table will use several fields together to form a primary key. These are called composite primary keys.
For example, a Customer table may use the combination of a phone number field and last name field to uniquely
identify a customer record.
Iron Speed Designer determines composite key relationships by querying the system information in the connected
database(s). If multiple rows are returned for a given table, it means that the table has a composite primary key, i.e. a
primary key consisting of multiple fields.
Iron Speed Designer also supports database tables without primary keys. In general, you can perform any operation
on a table lacking a primary key with the exception that individual records cannot be selected for update or deletion.

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

Foreign Key Use


Foreign key relationships in a database specify how one table is related to another table. For example, an Order table
may have a Customer ID field that is a foreign key to the Customer table. The Order ID field indicates which Customer
record is associated with the particular order.
Foreign keys can also indicate one-to-many relationships between tables. For example, an Order table may have a
related Order Detail table containing multiple line items for each individual order. The Order Detail table has an Order
ID field that is a foreign key to the Order table.
Applications generated by Iron Speed Designer support both composite primary and composite foreign keys. Iron
Speed Designer uses foreign key relationships in order to construct multi-table joins in SQL. In the examples above,
the application is able to display Customer and Order Detail information within a single Order page, by automatically
generating the table joins in SQL.
Iron Speed Designer uses the
foreign key relationships
specified in your database to
generate complex pages with
multi-table joins like this one.

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

Concurrency Handling in Generated Applications

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

Concurrency Handling in Generated Applications


Iron Speed Designer implements optimistic concurrency handling in applications. Specifically, Iron Speed Designer
calculates a checksum for each record. If the checksum is different when the application prepares to update a record,
then the application assumes record was changed by another uses. A warning message is displayed on the
application page alerting the second user.

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.

Sorting Collation Sequences


When Iron Speed Designer generates a table grid with a clickable column, the appropriate SQL query performs the
underlying database sorting operation. The sorting performed is generally alphabetic for most fields. The issue arises

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

Microsoft SQL Server 2000


Collation Support

In-line SQL

Stored Procedure SQL

Database level collation

Table level collation

Field level collation

Microsoft SQL Server 7


Collation Support

In-line SQL

Stored Procedure SQL

Table level collation

N/A

N/A

Field level collation

N/A

N/A

Database level collation

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

UPPER(C1) LIKE '%HOUSE%' AND


UPPER(C2) LIKE '%HOUSE%' AND
UPPER(C3) LIKE '%HOUSE%' AND
No syntax for more complex searches is provided by the Iron Speed search control, such as conjunctions (ands) and
disjunctions (ors).
However, you can create multiple search controls and associate each one of them to one or more fields. For example,
one search control can be provided to Search by Account Number and another to Search by Name or Company
Name.

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.

.NET Data Application Blocks


The Data Application Blocks functionality in .NET is an optional .NET component that can be used to simplify certain
types of common database operations. There are a number of limitations of this .NET component including that it only
supports Microsoft SQL Server and is based on .NET DataSets. The DataSets class in .NET provides limited
functionality, such as retrieving all the selected records from a query into memory for paging. For these reasons, Iron
Speed Designer does not generate applications that use the optional .NET Data Application Blocks functionality.
Iron Speed Designer actually surpasses the functionality provided by Data Application Blocks. It provides the same
reusability and ease of use, as well as a number of other features that enable you to build applications much faster.
Our Data Access layer provides better control over records being retrieved as well as strongly typed data sets so you
can create robust applications.
For more information on .NET Data Application Blocks, see:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.

z Page 389

EXCEPTION AND ERROR MANAGEMENT


There are a number of different types of errors that can occur in your application at run time. The following sections
describe how your application handles each type of error.
For more detail, see:

User Input Validation Errors

Internal Errors

Database Exception Errors

Application Logic Errors

Event Logging

User Input Validation Errors


Your application reports an error message to the application user. The error message is displayed in a pop-up dialog
box or in-line immediately at the time of the error and provides the ability for the application user to correct the error.
Iron Speed Designer automatically generates input field validation code for all supported field types. This validation
code has been thoroughly tested. End-users are notified of input errors directly on the web page, and are given a
chance to correct their errors and resubmit the entry. No system administrator notification or event logging is provided
for validation errors.

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.

Database Exception Errors


Database errors occur when the SQL statements executed are invalid or the database is not connected.
Iron Speed Designer automatically generates syntactically correct SQL queries. No system administrator notification
or logging is provided for database errors. Serious errors are logged to the servers operating system event log and
can be viewed through the Event Viewer. You can configure the Iron Speed base classes to log all database errors via

z Page 390

the LogDatabaseExceptions and LogCommitExceptions settings in the Web.config file described elsewhere in this
Guide.

Application Logic Errors


Application logic errors occur when the software itself has a bug.
Iron Speed Designer automatically generates correct, highly reliable, application logic. However, you may extend or
change the generated code, which can introduce errors (bugs) into the application program. Unhandled errors within a
page are written to the event log and can be viewed via the Event Viewer.

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

APPLICATION SECURITY MANAGEMENT


As much as we all wish it, the hackers and thieves will not disappear, especially when our networks open to the public
Internet and connect with outside customer and supplier systems. While you surely have an overall network and
firewall security plan in place, a large part of your application security is in the program code itself. You can increase
your applications security by taking advantage of the powerful benefits of Iron Speed Designer.
Applications generated with Iron Speed Designer utilize the highest level of security features offered in the .NET
Framework and include built in security for: role-based access control, database-resident password storage, automatic
sign-out, and data transmission encryption. Additionally, you can easily add features such as Windows authentication
and active directory single sign-on. And, applications generated by Iron Speed Designer work well with existing
firewall security systems.
For more detail, see:

User Authentication and Access Control for .NET

Implementing Windows Authentication with .NET Impersonation

Automatic Sign-Out

Data Transmission Encryption

Active Directory and LDAP

Password Storage

Firewall Security

Handling SQL Injection Attacks

Other Security-Related Materials

User Authentication and Access Control for .NET


Microsoft .NET offers several basic access control (user authentication) models:
1. Windows Authentication using the default local ASPNET account
2. Windows Authentication using a domain user account and password configured in the machine.config file.
3. SQL Server Authentication.

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:

Easy for users since no separate application sign-in is required.

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.

Windows Authentication with Domain User Account

Pros:

Easy for users since no separate application sign-in is required.

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.

SQL Server Authentication

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.

Windows Authentication with .NET Impersonation

Pros:

Allows accessing remote databases on separate servers.

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.

Implementing Windows Authentication with .NET Impersonation


Implementing Windows Authentication with .NET Impersonation is fairly simple to set up.
Step 1: Add a line to the applications Web.config file specifying the desired domain user account and password as
the anonymous user for the Web application. Within the <system.web> section, add:
<identity impersonate="true" />
Step 2: Configure the anonymous user within Microsoft IIS for the web site (or virtual directory) on the Directory
Security tab by clicking the Edit Anonymous access and authentication control button.

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.

Data Transmission Encryption


All application data transmitted to and from the client browser is encrypted using the web servers built-in SSL (secure
socket layer) encryption. This standard security ensures that no one can see your data as it passes over the public
Internet or over your private intranet and local area networks.
Applications generated by Iron Speed Designer are 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. The 3-tier architecture
ensures that your database is not connected directly to the application user.
Moreover, Iron Speed Designer does not generate any appreciable client-side scripting code that contains data access
logic. All data access code is in the Application Layer (middle tier), so that malicious application users cannot reverse
engineer the data access mechanisms.

Active Directory and LDAP


Active Directory and LDAP (low-overhead directory access protocol) are single sign on facilities available from
Microsoft and other vendors that provide a single sign-on and user authentication facility. A user signs in once, and
that sign in is transferred to all applications used by the user, saving them the time to sign in to each individual
application. Moreover, these facilities provide centralized user access control for IT departments, making it easier to
manage user accounts.
At present, Iron Speed Designer does not directly generate Active Directory calls. However, you can add this directly
to applications by extending the code to make these calls yourself. Additional information on this can be found in the
sections of this manual on modifying your applications source code.

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

Handling SQL Injection Attacks


SQL injection is the act of entering a particularly odd-looking string into a text box or query string in order to have
potentially malicious SQL code execute. For example, if you have an ASP page that accepts as a query string
parameter an ID field, and this ID field is then used to generate a dynamic SQL query, then your application may be
subject to an SQL injection attack. An application user may enter a query string like:
1; DELETE FROM Orders (or some other malicious SQL statement)

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.

Other Security-Related Materials


Understanding the Microsoft Windows, Microsoft SQL Server and ASP.NET security models is useful for contemporary
application development. We recommend reviewing these materials:

Microsoft Windows security model:

http://www.microsoft.com/technet/treeview/default.asp?
url=/technet/prodtechnol/sharepnt/proddocs/admindoc/owsa04.asp

Microsoft SQL Server security model:

http://www.microsoft.com/sql/techinfo/administration/2000/securityWP.asp

http://vyaskn.tripod.com/sql_server_security_best_practices.htm

ASP.NET security model:

http://www.microsoft.com/technet/treeview/default.asp?
url=/technet/prodtechnol/windowsserver2003/proddocs/server/aaconhowaspnetsecurityworks.asp

z Page 398

SCALABILITY AND PERFORMANCE


For more information, see:

Session Management

Running Applications on Multiple Servers

Concurrent Users

Improving Application Performance

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.

Running Applications on Multiple Servers


You can run any number of instances of your Iron Speed Designer applications on the same machine (server machine)
or on multiple machines. You can deploy applications generated by Iron Speed Designer to as many servers as you
wish, providing the scalability needed by most applications. Many developers deploy applications on web farms
groups of web servers used when an application or site has more traffic than a single web server can handle.
Most customers run their applications on the middle tier servers in a standard three-tier architecture. The Microsoft
IIS web servers run on a separate third tier servers and the database runs on the first tier server. Generally,
applications running on multiple servers are placed behind a load balancing router or load balancing software to
distribute application requests to an available, or least loaded, server.

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.

Improving Application Performance

Microsoft .NET performance


On a computer running Microsoft Windows NT, Windows 2000, or Windows XP, after you install Service Pack 1 (SP1)
for the .NET Framework, you may experience slower performance when you run applications that were created by
using ASP.NET and Visual Studio .NET. There is a Microsoft Knowledge Base article that discusses this topic and
suggests a remedy.
http://support.microsoft.com/default.aspx?scid=kb;en-us;324903
We recommend you install Service Pack 2 or later.

z Page 400

WEB.CONFIG CONFIGURATION FILE


Applications generated by Iron Speed Designer use the Web.config file for their various configuration parameters,
including database and email server connection strings.
The Web.config file is a standard .NET application file that contains a variety of settings that govern how the
application behaves. Iron Speed Designer modifies several of the default Web.config file settings. These changes are
described below and use standard XML syntax for storing these settings.
There are different Web.config files used for .NET Framework version 1.0 and .NET Framework version 1.1. If you
switch between the two versions, you must copy the correct version for both Iron Speed Designer and your generation
applications.
Use the Web.config file to
configure applications
generated by Iron Speed
Designer.

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.

For more detail, see:

appSettings Element

Run-Time Configuration Elements

Switching Between .Net Framework 1.0 and 1.1

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

Database connection strings hold the information related to the databases


connected to the application.
Parameter

Description

connectionName

The name of the database connection. This is used for


identification purposes in Iron Speed Designer.

database

The database upon which Iron Speed Designer is


connected for application development.

DBServer

The database server name of the database upon which


Iron Speed Designer is connected for application
development.

z Page 402

Key

Description
password

status

typeOfServer

Password of the database upon which Iron Speed


Designer is connected for application development.
NORMAL

This is the default value.

TO_BE_UNLINKED

Iron Speed Designer will set


the value to
TO_BE_UNLINKED when
the developer wishes to
disconnect a database
connection that contains
tables used by an
application.

The type of database server.


MS_SQL_SERVER

username

Microsoft SQL Server.

User name of the database upon which Iron Speed


Designer is connected for application development.

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

DefaultPageUrl is required in order to establish the default page of the application.


You may edit this setting to change the default page. The initial setting is created
by Iron Speed Designer.
Usage:
<configuration>
<appSettings>
<add key= DefaultPageUrl value="/MyApp/MyDefaultPage.aspx />
</appSettings>
</configuration>

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

Normally, a thread is started at the end of the generation process that


asynchronously accesses the applications pages so that IIS will compile the ASPX
and ASCX files.
true

The compilation thread is started. This is the default value.

false

The compilation thread is not started. This can be useful in a


development environment, since the thread can consume most of the
server's CPU cycles for many minutes.

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

Run-Time Configuration Elements


The run-time configuration elements holds a variety of key-value pairs for various settings for setting things like
automatic session time-outs and HTTP error display pages.
Parameter

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"
/>

Switching Between .Net Framework 1.0 and 1.1


In moving from your development environment to your production environment, you may need to adjust your
application to work under a different version of the .NET framework. In particular, these configuration changes should
be made:
1. Update the Web.config files for each of your applications.
2. Reset the ASP.NET state service default to automatically run on start-up.
Detailed instructions for switching between .NET Framework versions are elsewhere in this Guide. We recommend
you follow the procedures outlined there.
In particular, for each applications \<Application Folder>\Web.config file and \<Application
Folder>\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.
For more information on the differences between .NET Framework 1.0 and 1.1:

http://www.gotdotnet.com/team/changeinfo/default.aspx

z Page 409

COMPATIBILITY BETWEEN PROFESSIONAL AND ENTERPRISE


EDITIONS
Your team can develop applications using a combination of Iron Speed Designer Professional Edition and Enterprise
Edition.
Applications created with the Professional Edition are fully compatible with the Enterprise Edition, and no migration is
required going from Professional Edition to Enterprise Edition.
Applications created with Enterprise Edition can also be extended with Professional Edition. However, if certain
features are used that are only available in the Enterprise Edition, those features cannot be modified or changed in the
Professional Edition.

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

Credit Card Date

Credit Card Number

Email Address

File

Percentage

Web URL

US Phone Number

US State

US ZIP Code

z Page 411

PART V: DEPLOYING APPLICATIONS

PART V: DEPLOYING APPLICATIONS ............................................................................... 1


Building Your Application...................................................................................................................... 3
Deploying Applications to a Production Server .................................................................................. 6
Copying Your Application to a Production Server.................................................................................................6
Copying Stored Procedures to a Production Server.............................................................................................7
Create a Virtual Directory for Your Application .....................................................................................................7
Changing Database Connection Settings .............................................................................................................7
Adding Your Application to the Windows Registry................................................................................................8
Starting Your Session State Service.....................................................................................................................9

Utility Programs .................................................................................................................................... 10


CompileApplication .............................................................................................................................................10
LoadStoredProcedures .......................................................................................................................................11

Creating a Virtual Directory for Your Application..............................................................................12


Configuring Database Authentication for Applications.................................................................... 18
Using Windows Authentication ...........................................................................................................................18
Case 1: Microsoft SQL Server is installed on the local machine ..................................................................19
Case 2: Microsoft SQL Server is installed on a remote machine .................................................................20
Using Microsoft SQL Server Authentication........................................................................................................20

Troubleshooting Your Application...................................................................................................... 22


Application Wont Run.........................................................................................................................................22
A potentially dangerous Request.Form value was detected from the client ..................................................23
Cannot update [tablename]. The data you entered conflicts..........................................................................24
File or assembly name xxx.DLL, or one of its dependencies..........................................................................25
HTTP Error 403 Forbidden. You are not authorized to view this page .......................................................25
Login failed for user 'NT AUTHORITY\NETWORK SERVICE' ...........................................................................25
Potentially dangerous XML..............................................................................................................................26
Time out ..........................................................................................................................................................26
Unable to authenticate user.............................................................................................................................27
Unable to make the session state request ......................................................................................................27
Unrecognized attribute 'validateRequest' ........................................................................................................28

Configuring the Microsoft .NET Framework ...................................................................................... 30


Verifying the .NET Framework was Installed after Microsoft IIS.........................................................................30
Verifying ASP.NET is Set Up Correctly...............................................................................................................31
Switching Between .NET Framework 1.0 and 1.1 ..............................................................................................33

412

Working with Microsoft Visual Studio .NET ....................................................................................... 37


Visual Basic Project File......................................................................................................................................37
Iron Speed Designer Custom Controls ...............................................................................................................37
Compiling Applications in Debug Mode ..............................................................................................................37
Run-time Application Tracing ..............................................................................................................................39
Using Microsoft Visual Design ............................................................................................................................39
Source Code Control...........................................................................................................................................40

Iron Speed Personal Web Server ........................................................................................................ 42


Microsoft .NET Educational Resources.............................................................................................. 44

z Page 413

BUILDING YOUR APPLICATION


The application building process converts layout pages, database table bindings, and component properties into a
three-tier application. Specifically:

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

A user interface web page generated by Iron Speed


Designer.

An ASPX user interface page generated by Iron


Speed Designer.

User interface code generated by Iron Speed Designer.


SQL query generated by Iron Speed Designer.
The application building process is generally affected by the following:

The current name, location, attributes, and contents of your applications source files, including:

Layout pages

Table bindings (table binding files)

z Page 415

Component properties and data bindings (properties files)

Page style and image files

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:

Microsoft IIS web server

Database servers

Windows security and permissions

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

DEPLOYING APPLICATIONS TO A PRODUCTION SERVER


In most organizations, application developers deploy to a local test environment before deploying to a production
environment. This allows you to thoroughly test in a safe environment before moving the application into production.
When generating an application in Iron Speed Designer, the application is automatically deployed on to the local
server that is running Iron Speed Designer. This is almost always a development or test environment. When you are
ready to deploy the tested application into a production environment, several additional steps are required:
1. Copy your applications executable files and web pages to your production server.
2. Copy your stored procedures to your production database.
3. Create a virtual directory for your application on your production server. Identify your application to the
Microsoft IIS web server(s) in your production environment.
4. Change your database connection settings. Update your Web.config file so that the database connection
strings point to your production database(s).
5. (Optional) Add your application to the Windows Registry. This enables Windows event viewer logging of
certain events and errors.
6. (Optional) Start your session state service.
This section contains information about:

Copying Your Application to a Production Server

Copying Stored Procedures to a Production Server

Create a Virtual Directory for Your Application

Changing Database Connection Settings

Adding Your Application to the Windows Registry

Copying Your Application to a Production Server


Moving your applications executable files to a testing or production server is easy. Simply copy the entire application
folder to your production server, including all of the files in the sub-directories underneath with the exception of the
Source folder and its sub-directories. The Source folder contains the source files used by Iron Speed Designer to
generate your application, and these source files are not needed in your production server for your application to
operate.

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

Copying Stored Procedures to a Production Server


Use the LoadStoredProcedures utility program to load your applications stored procedures into your production
database server.
The LoadStoredProcedures utility is described in more detail elsewhere in this Guide.

Create a Virtual Directory for Your Application


Your applications are fully compatible with Microsoft Internet Information Server (IIS). Iron Speed Designer
automatically creates a virtual directory for your application under Microsoft IIS, typically on your development
machine, when the application is first created. In the event the virtual directory cannot be created because the
currently logged in account does not have the appropriate security settings, the virtual directory will need to be created
before your application can run.
You can use Microsoft IIS to run your applications by using a URL similar to:
http://localhost/<application_name>

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:

Your Microsoft IIS documentation

Creating a Virtual Directory for Your Application

Iron Speed Personal Web Server

z Page 418

Changing Database Connection Settings


Before configuring your production database to run your application, you will need to gather the following information:
Component
Microsoft IIS

Server root directory


Administrative privileges

You will need Microsoft IIS web server administrative privileges to


configure virtual directories in Microsoft IIS for the applications.
Contact your system administrator if you need administrative
privileges for your Microsoft IIS web server.

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.

Also see Configuring Database Authentication for Applications.

Adding Your Application to the Windows Registry


Microsoft Windows maintains a registry database of key application parameters. Applications generated by Iron
Speed Designer will optionally log certain events into the Windows Event Viewer, and in order to do this, require
certain registry settings. When you copy your application to a production environment, you can add the entry below to
the Registry to permit Event Viewer logging. Please note that adding this Registry entry is optional, but it is useful in
debugging your application.
The Registry entry is:

z Page 419

Windows Registry Editor Version 5.00


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\IronSpeed]

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.

Starting Your Session State Service


ASP.NET applications require that the ASP.NET State Service be running. Most likely, your system is already
configured to automatically run the Session State Service when it boots up. In case it is not, however, follow these
steps to automatically run the ASP.NET State Service:
Step 1: Go to: Control Panel | Administrative Tools | Services
Step 2: Locate "ASP.NET State Service".
Step 3: Set Startup type to: "Automatic"

z Page 420

Step 4: Click "Start", if the "ASP.NET State Service" is not started.


Step 5: Click OK.

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 = ""
>

The RootNamespace attribute ("Tutorial") is used.

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

CREATING A VIRTUAL DIRECTORY FOR YOUR APPLICATION


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.
Iron Speed Designer tries to automatically create a virtual directory for you as part of its application building process. If
for any reason it cannot, you must create the virtual directory by hand before running your application.
Windows XP and Windows 2003
You can create a virtual directory manually through the Microsoft IIS web server manager by right clicking on the
directory, selecting Properties, then clicking the "Create" button in the Directory tab.
This Microsoft IIS web
server screen shot shows
an application directory
called 20010 that has not
yet been configured as an
application. Clicking Create
will do so.

Windows 2000
The following procedure is an example of how to create a virtual directory in Microsoft IIS.

z Page 424

Creating a virtual directory


From the Start menu, click Start,
Settings, Control Panel, Administrative
Tools, Internet Information Services.

In Internet Information Services, click


New, Virtual Directory

z Page 425

Use the Virtual Directory Creation


Wizard to create a virtual directory for
your application.
Click Next> to proceed.

Enter your applications Alias. This is


typically the Application ID selected by
Iron Speed Designer when creating
your application.
Click Next>.

z Page 426

Enter the directory containing your


application.
Click Next>.

Make sure your application has


permission to Read files and Run
Scripts.
Click Next>.

z Page 427

Click Finish.

z Page 428

Check that your applications virtual


directory has been properly created.
Select Properties to display your
applications Properties dialog.

z Page 429

Check that the Application Name field


contains your applications name. If so,
click OK. You have successfully
created a virtual directory for your
application. If not, proceed to the next
step.

Click Create and create an application.

z Page 430

CONFIGURING DATABASE AUTHENTICATION FOR


APPLICATIONS
ASP.NET applications must provide authentication credentials when connecting to Microsoft SQL Server databases.
You have two options:
1. Windows Authentication. This will use the Microsoft Windows user credentials specified in your .NET
framework machine.config file.
2. Microsoft SQL Server Authentication. Use the name and password of a specific SQL Server login account.
For more detail, see:

Using Windows Authentication

Using Microsoft SQL Server Authentication

Using Windows Authentication


All ASP.NET applications are configured to run as a specific Windows user. This is specified in the .NET framework
machine.config file. By default, the user account is <local machine>\ASPNET. This ASPNET user is a local machine
account that has limited privileges, allowing web applications to run as a relatively un-trusted user without
administrative privileges so they cannot compromise the integrity of the server.
You can check the user configuration in the machine.config file as follows:
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: Search for the string processModel and look for the userName and password attributes.
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="60"

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.

Case 1: Microsoft SQL Server is installed on the local machine


If your Microsoft IIS web server and your Microsoft SQL Server are running on the same machine, do the following to
enable your applications to connect to Microsoft SQL Server.
Step 1: Determine the Windows user ID that is used by ASP.NET applications by checking the machine.config file as
described above. By default, this user ID is <local machine>\ASPNET.
Step 2: Create an account for the user in Microsoft SQL Server
Use Enterprise Manager --> Database server --> Security --> Logins
If you have not changed the default ASP.NET user, add a <local machine>\ASPNET login. If you have changed the
default ASP.NET user to a user other than ASPNET, add a login for that 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.

Case 2: Microsoft SQL Server is installed on a remote machine


If your Microsoft SQL Server is running on a different machine than your Microsoft IIS web server and you have not
changed the default ASP.NET user, you will need to perform additional configuration steps. If you do not, you will get
a user not found error when you try to add a Microsoft SQL Server login for the ASPNET user. In particular, you
must change the ASP.NET user to a valid domain user by configuring machine.config as follows.
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 userName and password attributes in the processModel element to a valid Windows domain user.
See above for a description of the userName and password attributes.
Step 3: Reset Microsoft IIS or stop the aspnet_wp.exe process in order for your changes to take effect.
Step 4: Create an account for the configured user (now a valid domain user) in Microsoft SQL Server
Use Enterprise Manager --> Database server --> Security --> Logins
Step 5: 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.

Using Microsoft SQL Server Authentication


In order to use Microsoft SQL Server Authentication, your Microsoft SQL Server must be configured to allow this
option. This is configured from Microsoft SQL Server Enterprise Manager.
To enable Microsoft SQL Server Authentication:
Step 1: Start Microsoft SQL Server Enterprise Manager.
Step 2: Locate the Microsoft SQL Server you wish to configure. Right-click the server and select Properties. The
Properties dialog is displayed.

z Page 433

Step 3: In the Properties dialog, select Security.

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

TROUBLESHOOTING YOUR APPLICATION


Sometimes applications do not run properly due to various configuration issues. This section describes several
configuration issues that occur from time to time.
This section contains information about:

Application Wont Run

A potentially dangerous Request.Form value was detected from the client

Cannot update [tablename]. The data you entered conflicts

File or assembly name xxx.DLL, or one of its dependencies

HTTP Error 403 Forbidden. You are not authorized to view this page

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

Potentially dangerous XML

Time out

Unable to authenticate user

Unable to make the session state request

Unrecognized attribute 'validateRequest'

Application Wont Run

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

A potentially dangerous Request.Form value was detected from the client

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

Some of this information is reproduced below:


validateRequest:
Indicates that ASP.NET examines all input from the browser for potentially dangerous data. If true, request validation
is performed by comparing all input data to a list of potentially dangerous values. If a match occurs, ASP.NET raises
an HttpRequestValidationException exception.

true indicates that input from the browser is checked. The default is true.

z Page 437

false indicates that input from the browser is not checked.

Cannot update [tablename]. The data you entered conflicts

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.

File or assembly name xxx.DLL, or one of its dependencies


You may see this error message when running your application:
File or assembly name xxxxxxxx.dll, or one of its dependencies, was not found.
This occurs when the .NET Framework is not properly registered under Microsoft IIS, generally because the .NET
Framework was installed before Microsoft IIS. Run this command line utility provided by Microsoft to fix this problem:
aspnet_regiis I

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.

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'


When you run a .NET application, the Windows user account it runs under is defined by the framework's
Machine.config file. In some cases, the configured user is set to NETWORK SERVICE. In order to access Microsoft
SQL server from a .NET application using Windows authentication, you must add access in Microsoft SQL Server for
the NETWORK SERVICE user. Please read the following link for more information.
http://www.dotnet247.com/247reference/msgs/29/146491.aspx

Potentially dangerous XML


If you see warning messages regarding "potentially dangerous" XML, it means that applications need to run under
.NET Framework version 1.1.
If you have both .NET Framework version 1.0 and .NET Framework 1.1 installed on your machine, your application
may assume that you will be running applications using .NET Framework version 1.1. This assumption may not
always be correct. Even though .NET Framework version 1.1 is installed, your system (Microsoft IIS) may be
configured to run applications under .NET Framework version 1.0.
See Switching Between .NET Framework 1.0 and 1.1 for further details on changing the Web.config file.

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:

responseDeadlockInterval (defaults to 3 minutes)

responseRestartDeadlockInterval (defaults to 9 minutes)

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.

Unable to authenticate user


You may receive the following message when attempting to log into your application:
"Unable to authenticate user. Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server
connection.
Please grant SQL Server login privileges and add the System Administrators role to the user on the
'<servername>' instance of SQL Server."
The problem is caused by the absence of configuration information that prevents your application from connecting to
the Microsoft SQL Server database.
See Configuring Database Authentication for Applications for more details.

Unable to make the session state request


Your ASP.NET State Service is not running. Follow these steps to automatically run the ASP.NET State Service:
Go to: Control Panel | Administrative Tools | Services
Locate "ASP.NET State Service".
Set Startup type to: "Automatic"
Click "Start", if the "ASP.NET State Service" is not started.
Click OK.

z Page 440

Unrecognized attribute 'validateRequest'


Microsoft added a new feature in .NET Framework 1.1 called Request Validation. By default, each web page is
checked to see that no raw XML is submitted. Request Validation is not required for applications. Details can be
found at:
http://www.asp.net/faq/RequestValidation.aspx
Your application checks to see if .NET Framework version 1.1 is installed on your machine. If so, the Web.config file
for your applications are set with the Request Validation feature turned off.
If you have both .NET Framework version 1.0 and .NET Framework 1.1 installed on your machine, your application
program assumes that you will be running applications using .NET Framework version 1.1. This assumption may not
always be correct. Even though .NET Framework version 1.1 is installed, your system (Microsoft IIS) may be
configured to run applications under .NET Framework version 1.0.
If you see an error that says:

z Page 441

Unrecognized attribute 'validateRequest'


you may need to change the Web.config file for your applications.
See Switching Between .NET Framework 1.0 and 1.1 for further details on changing the Web.config file.
Alternatively, if you see warning messages regarding "potentially dangerous" XML, it means that applications need to
run under .NET Framework version 1.1.

z Page 442

CONFIGURING THE MICROSOFT .NET FRAMEWORK


This chapter contains information about:

Verifying the .NET Framework was Installed after Microsoft IIS

Verifying ASP.NET is Set Up Correctly

Switching Between .NET Framework 1.0 and 1.1

Verifying the .NET Framework was Installed after Microsoft IIS


In order for your applications to run properly, the .NET Framework must be installed after Microsoft IIS is installed. If
this is not the case for your machine, Microsoft provides the aspnet_regiis utility program to uninstall and then reinstall
the .NET Framework. Its purpose is to ensure that ASP.NET is set up properly and otherwise manage the .NET
installation. Specifically, aspnet_regiis:

Defines the ASP.NET user account under which Microsoft IIS runs.

Registers all of the ASP.NET components with Microsoft IIS.

Defines the ASP.NET State Service that is used by Microsoft IIS when running .NET applications.

Copies the common ASP.NET files to their proper place.

Associates particular web applications with their correct versions of .NET.

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

Go to: Control Panel | Administrative Tools | Services


Locate "ASP.NET State Service".
Set Startup type to: "Automatic"
Click "Start", if the "ASP.NET State Service" is not started.
Click OK.

Verifying ASP.NET is Set Up Correctly


Most applications built with Iron Speed Designer require access to a Microsoft SQL Server database in order to run.
Accordingly, you will need to provide login information sufficient for your applications to connect to and log into a
Microsoft SQL Server database.
All web applications in the .NET environment run by default under a Windows user account named <local
machine>\ASPNET. This ASPNET user is a local machine account that has limited privileges. If Microsoft SQL
Server is installed on your local machine, it is possible to create a Microsoft SQL Server login account for the ASPNET
user, allowing 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 login account for the <local
machine>\ASPNET user because the ASPNET user is not recognized as a valid domain account. (ASPNET is a local
machine account only.) In this case, you must log into Microsoft SQL Server using Microsoft SQL Server
Authentication.
Installing on a Domain Controller Machine (Windows 2000 Server)
If you are running your applications on a Windows 2000 server that is also a domain controller, you must make sure
that ASP.NET is set up correctly. Follow the instructions at the link below to setup ASP.NET correctly on a Windows
2000 machine that is a domain controller:

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).

Switching Between .NET Framework 1.0 and 1.1


After downloading and installing Microsoft .NET Framework 1.1 there are several configuration issues to resolve.
1. Update the Web.config files for each of your applications.
2. Reset the ASP.NET state service default to automatically run on start-up.
For information on the differences between .NET Framework 1.0 and 1.1:

http://www.gotdotnet.com/team/changeinfo/default.aspx

Switching to .NET Framework V1.1


We provide two versions of Web.config to make it easy to switch between .NET Framework version 1.0
(Web1.0.config) and Version 1.1 (Web1.1.config).

z Page 446

To switch to .NET Framework version 1.1, do the following:


copy ...<Iron Speed Folder>\ProjectTemplate\Source\Web1.1.config to
...<Iron Speed Folder>\ProjectTemplate\Source\Web.config

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

WORKING WITH MICROSOFT VISUAL STUDIO .NET


Application code generated by Iron Speed Designer is designed to work directly with Microsoft Visual Studio .NET.
This section contains information about:

Visual Basic Project File

Iron Speed Designer Custom Controls

Run-time Application Tracing

Using Microsoft Visual Design

Source Code Control

Visual Basic Project File


Iron Speed Designer automatically generates a VBPROJ file -- the Visual Basic .NET project that can be opened in
Visual Studio .NET.
The VBPROJ file is created when Iron Speed Designer initializes your application. Iron Speed Designer automatically
updates the project file every time the application is built. Separately, a command line utility program,
CreateProject.exe, is provided that adds all of an applications files to the project file.
Iron Speed Designer does not create a .SLN file (solution file), because Visual Studio .NET automatically creates one
if you open any VBPROJ file.

Iron Speed Designer Custom Controls


The custom controls in the Iron Speed base classes (the Primitive/Base components) are designed to integrate with
Visual Studio .NET's Visual Designer, and are used in the user controls (the ASCX files) we generate for the
application. This means that if you open one of the generated ASCX files using Visual Studio .NET Visual Designer,
you will be able to see the Iron Speed Designer custom controls, edit their custom properties using their property
sheets, add them to your Visual Studio .NET Toolbox, etc.
The web controls in the Iron Speed base classes contain special .NET meta-tags in their code to enable this
integration with Visual Studio. You need take no special action to use these controls. These controls are already used
in the web pages generated by Iron Speed Designer, so the web pages may be opened directly in Visual Studio .NET.

z Page 450

Compiling Applications in Debug Mode


You can compile applications in Debug mode in Visual Studio.NET.
Step 1: Open your application in Visual Studio .NET.
Step 2: Select "Configuration Manager".
Step 3: Select a <New...> Active Solution Configuration.

Step 4: Give it a name such as "Debug", and click "OK".

Step 5: Click the "Close" button in Configuration Manager.


Step 6: Notice that the project can now be compiled in "Debug" mode via Visual Studio.NET.

z Page 451

Note: For faster performance, we recommended your application be compiled in Release mode.

Run-time Application Tracing


.NET application support a variety of run-time application tracing and page-level tracing.
Tracing Overview
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontracefunctionality.asp

Enabling App-level Tracing


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconenablingapplication-leveltracing.asp

Enabling Page-level Tracing


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondisplayingtracemessagesonpage.asp

Using Microsoft Visual Design


The Microsoft Visual Design feature in Visual Studio .NET requires that the code behinds be built using Visual Studio
.NET. However, Iron Speed Designer compiles the generated source code using VBC, the command line compiler
provided as part of the .NET framework. This allows Iron Speed Designer to operate independently of Visual Studio
.NET.
When using the Microsoft Visual Design feature, you may get this error message:

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.

Open your application's project file in Visual Studio, for example:

C:\Program Files\Iron Speed Designer\OMS\OMS.sln

Select Build Solution in the Build menu. This will rebuild the SLN solution file. The environment should then
work properly.

Source Code Control


There are two general approaches to source code control: developer-centric and server-centric. In the developercentric approach advocated by Iron Speed Designer, developers have a local copy of the application and the source
code and run the application on their local machines. In the server-centric approach, all developers "deploy" to the
same server.
Most developers using Iron Speed Designer also use source code control systems to coordinate development between
multiple developers working on a project so they do not destroy each others work by accidentally overwriting it. While
Iron Speed Designer does not directly integrate with any particular source code control system, such as PVCS or
SourceSafe, you can use a source code control system to check-in and check out source files generated by Iron
Speed Designer.
Iron Speed Designer considers several types of files to be source code files:

Any file used to build the resulting application.

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 cascading style sheets. Typically located in:


\<Application Folder>\Source\Styles

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

IRON SPEED PERSONAL WEB SERVER


By default, applications built with Iron Speed Designer are configured to run under Microsoft Internet Information
Server (IIS). However, you may not have Microsoft IIS installed or running on your system. If you do not wish to run
your applications under Microsoft IIS, you may use the Iron Speed Personal Web Server instead.
The Iron Speed Personal Web Server has been developed using the Microsoft .NET Framework Version 1.1. The
Personal Web Server is automatically started when you instruct Iron Speed Designer to run your applications under
the Personal Web Server. When the Personal Web Server is running, an icon is displayed in the system tray in your
operating system.

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

MICROSOFT .NET EDUCATIONAL RESOURCES


Iron Speed Designer uses Microsoft .NET because it provides several important architectural advantages for webbased applications.
1. Microsoft .NET enables the application user interface to be separated from its underlying data and application
logic. Applications generated by Iron Speed Designer make use of this, enabling all of the application code to
run on the server rather than have to be downloaded to the client (web browser).
2. Microsoft .NET supports several programming languages, including Visual Basic, C# and Java, allowing you to
develop your application specific logic in the language of your choice. Moreover, because of .NETs common
language runtime (CLR), components written in any of these languages can be seamlessly integrated with
your Iron Speed Designer-application, giving you more choices in your development environment. Unlike
many application severs, you are not forced to develop in Java alone.
3. The Microsoft .NET environment makes the process of web-based application development very similar to the
development process for Microsoft Windows applications. This enables you to better leverage your existing
developer training and expertise.
A variety of books and articles are available on developing applications for the Microsoft .NET platform. We
recommend the following:

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

PART VI: EXTENDING THE CODE GENERATOR

PART VI: EXTENDING THE CODE GENERATOR ................................................................. 1


Building Reusable Panels and Components ....................................................................................... 2
Building Independent Reusable Panels ................................................................................................................3
Adding a Reusable Panel to a Page .....................................................................................................................3
Button Panels........................................................................................................................................................4
Navigation Menu Panels (Menu Tabs)..................................................................................................................7
Panels Requiring Record Information .................................................................................................................11

Using Third-Party Controls.................................................................................................................. 17


Independent Third-Party Controls.......................................................................................................................17
Integrating Third-Party Controls with the Database............................................................................................19
Replacing Controls Generated by Iron Speed Designer.....................................................................................24
Making API Calls to Your Application .................................................................................................................25

Creating and Customizing Page Templates....................................................................................... 27


Whats in a Page Template? ...............................................................................................................................32
Adding and Modifying Page Templates ..............................................................................................................33
Record Page Templates ................................................................................................................................35
Table Page Templates...................................................................................................................................40
Style Sheets ........................................................................................................................................................46
Placing ASP.NET Directives in Page Template Files .........................................................................................47

Generating Your Own Custom Code .................................................................................................. 49

458

BUILDING REUSABLE PANELS AND COMPONENTS


One of the most powerful features of Iron Speed Designer is the ability to create and use reusable panels and
components. For example, a header, footer and menu panel can be included on every page of an application.
Reusable panels allow the definition of the panel in one place and pages simply refer to these panels. Changes only
need be made once to the panel and will be reflected on all pages that use the panel. This allows you to consolidate
the most common aspects of your application into one location and reuse them as often as necessary.
Reusable panels are simply fragments of a page and are generated as ASCX controls instead of ASPX pages. Just
like a page, they start with an HTML layout page file and are configured through the Properties dialog. Once
generated they are referred to by other HTML layout pages or panels by using the GEN:Use code generation tag.
Reusable panels can be either completely independent or they can be dependent on the page or panel that includes
them. For example, the header panel typically is a completely independent panel containing a logo, and other images.
However, while a reusable button panel specifies the layout, but the page or panel that incorporates the button
specifies the actual button label, the action to take, and the URL to go to when the button is clicked. The immediate
parent provides any additional information needed by the dependent panel. For example, the button label within a
footer panel can only be specified at the footer panel level, but not at the page level.
Reusable panels can be nested as deeply as you like. For example, a reusable button panel might be included in the
reusable Footer panel that is included on each page. There is no limitation on the number of levels of nesting.
Reusable panels also provide flexibility in naming. The names of code generation tags used within a panel will not
conflict with any names within the page or panel that uses them. The names must be unique within a page or panel,
but not across multiple pages or panels.
This section contains information about:

Building Independent Reusable Panels

Adding a Reusable Panel to a Page

Button Panels

Navigation Menu Panels (Menu Tabs)

Panels Requiring Record Information

Building Independent Reusable Panels


A header is typically an independent reusable panel that can be included in every page created. To create the
reusable panel:

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

Step 3: Set the Logo tags URL property.


Tag Property

Setting

Code generation tag

Logo

Image file (URL)

http://www.ironspeed.com/art/logo.gif
Any URL you wish.

Adding a Reusable Panel to a Page


The panel is now ready to be included in a page. To include this panel on a page:
Step 1: Create a simple layout page file that includes the reusable panel. The reusable panel is specified by using the
GEN:Use code generation tag. The File attribute of this tag specifies the panel to use. The file name specifies the
location of the file including the directory. If no directory is specified, it is assumed to be in the same directory as the
page that is including this panel.
<GEN:Use Name="Header" File="HeaderPanel.html"/>
this is the rest of the page

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

Code generation tag

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>

<!-- green button -->


<style type="text/css">
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="3" cellspacing="0" border="1"
bordercolorlight="#C0C0C0" bordercolordark="#808080"
style="border-collapse: collapse" bgcolor="#008000">
<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

Code generation tag

Button

Button Text

Leave unset

Image file (URL)

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

Code generation tags

PrevButton
NextButton
OKButton
CancelButton

Button text

Next

Button action

Redirect

Redirect URL

http://www.ironspeed.com
URL of your choosing

Send notification event to

None

Step 5: Build and run the application and review the buttons displayed.

z Page 463

Navigation Menu Panels (Menu Tabs)


One of the most useful features of Iron Speed Designer is the ability to define a menu for your entire application and
use it on every page. The Menu is dependent on the page to determine the currently highlighted menu item. To
create a menu, first create two layout page files one to display the normal unselected state and the other to display
the highlighted state. Next create a menu panel that includes all of the menu items you would like to display in the
application and finally include the menu panel on a page.
The menus can be created using links or images. Depending on your preference, you can use either of the two code
generation tags. Note: Iron Speed Designer requires the name of the code generation tag to be Button.
Step 1: Create a layout page file for the normal unselected menu item. This layout page file defines a generic menu
item. The name of the code generation tag must be Button. The NormalMenu 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="NormalMenu" bgcolor="#000080" >
<GEN:LinkButton Name="Button"/>
</td>
</tr>
</table>

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

Code generation tag

Customers
CustomersHilited

Button Text

Customers

Action

Redirect

Send notification event to

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

Panels Requiring Record Information


Reusable panels can also be dependent on the parent for information about the current record being displayed. For
example, if you would like to display an Employee record in the same way on multiple pages, then the best way is to
create a panel that would display one record. This panel can be used multiple times on a page or even within a table.
The information about which employee record to display will not be available to the panel at design time; it is provided
to the panel at run-time by the page that includes the panel.
The following example shows how an employee record panel can be created and used on two different pages. The
first page uses the panel twice to show information about two employees side-by-side. The second page displays the
employee panel within a table of employee records.
Step 1: Create an employee panel layout page file called EmployeePanel.html. This panel layout page file will contain
the GEN:FieldValue tags without any enclosing GEN:Record tag.
<table width=400 cellpadding="5" style="border-collapse: collapse"
border="1" bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">
<tr style="font-family:Verdana; font-size:10px">
<td align="left" valign="top">
<GEN:FieldValue Name="Photo" />
</td>
<td align="left" valign="top">
<GEN:FieldValue Name="FirstName" />&nbsp;<GEN:FieldValue Name="LastName" /><br>
<GEN:FieldValue Name="Address" /><br>
<GEN:FieldValue Name="City" />,&nbsp;
<GEN:FieldValue Name="Region" />&nbsp;<GEN:FieldValue Name="PostalCode" />
<GEN:FieldValue Name="Country" />
</td>
</tr>
</table>

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

Code generation tag

All FieldValue tags

Table, view or query

No selection

Field

Appropriate database 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

Code generation tag

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

Code generation tag

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

<GEN:Use Name="Employee1Panel" File="EmployeePanel.html"/>


</GEN:Record>
</td>
<td>
<GEN:Record Name="Employee2">
<GEN:Use Name="Employee2Panel" File="EmployeePanel.html"/>
</GEN:Record>
</td>
</tr>
</table>

Step 8: In the PageWithPanels.html layout page, set the properties for the Employee1 Record code generation tag.
Tag Property

Setting

Code generation tag

Employee1

Table, view or query

Employees

URL query string parameter

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

Code generation tag

Employee2

Table, view or query

Employees

URL query string parameter

Emp2

Step 10: Set the Type property to User Control for both Employee1Panel and Employee2Panel.
Tag Property

Setting

Code generation tag

Employee1Panel

Type

User Control

Tag Property

Setting

Code generation tag

Employee2Panel

z Page 471

Tag Property

Setting

Type

User Control

Step 11: Build and run the application.


Step 12: View the page by specifying the two URL parameters.
http://localhost/Tutorial/TUTORIAL%20PAGES/PageWithPanels.aspx?Emp1=1&Emp2=2

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

Code generation tag

Employees

Table, view or query

Employees

Step 3: Set the Type property to User Control for the EmployeePanel tag.
Tag Property

Setting

Code generation tag

EmployeePanel

Type

User Control

Step 4: Build and run the application.


Step 5: View the generated page using the URL:
http://localhost/Tutorial/TUTORIAL%20PAGES/PageWithPanelInTable.aspx

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

USING THIRD-PARTY CONTROLS


In many web application development scenarios, its common to incorporate custom code into the application. These
custom components can be built internally, licensed from third parties, or acquired from open source projects.
Regardless of their source, such components can provide functionality quickly and easily without imposing additional
development burdens (other than integrating the code into Iron Speed Designer).
The Base Classes included with Iron Speed Designer provide a rich set of controls such as tabbed menus, buttons,
filters, and search boxes. These rich set of controls can be further supplemented by third-party controls and controls
that you might have developed for other applications. The ability to include other controls and tightly integrate them
within Iron Speed Designer is a very powerful feature that allows you to build virtually any type of application with ease.
You are no longer limited to using controls that are provided by Iron Speed Designer.
Adding third-party controls, grids, and other functionality to the web pages generated by Iron Speed Designer is very
easy. By changing the layout page files or using custom panel files, you can include whatever HTML, JavaScript, and
server-side code you want in a page or composite component, including applet tags, etc.
Third-party controls can be incorporated as independent controls included on the page or as controls that receive their
data from the database. To retrieve the data from the database and populate a third-party control, you can use any of
the application layer classes automatically generated by Iron Speed Designer.
This section contains information about:

Independent Third-Party Controls

Integrating Third-Party Controls with the Database

Replacing Controls Generated by Iron Speed Designer

Making API Calls to Your Application

Independent Third-Party Controls


Including an independent third-party control within a page you create is fairly simple. You can embed any control in
the HTML layout page and it will be passed through to the generated page un-altered. This allows you to incorporate
any ASPX control or even VBScript into your layout page file. Iron Speed Designer only pays attention to the GEN:
code generation tags and only replaces those tags with controls built upon the BaseClasses. This control is an
independent control since it does not use any data from the database, utilize any code generation tags or use any of
the generated classes.

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

<link href="menuStyle.css" type="text/css" rel="stylesheet" >


<!-- This third party control is available at http://www.aspnetmenu.com
-- A sample DLL for this menu is placed in the bin folder of this Tutorial
-- application.
-- The sample DLL is only for demonstration purposes. You will need to
-- license the third party library from the CyberAKT - the manufacturer of
-- ASPNetMenu.
-- The MenuData.xml file contains the menu names and the URL's. For more
-- information about the menu control, please visit the ASPNetMenu.com site.
-->
<cyberakt:ASPnetMenu id=Menu1
MenuStyle="ClassicHorizontal"
MenuData="menuData.xml"
ExpandDelay="50"
ExpandEffect="Fade"
EffectDuration="200"
runat="server"
/>

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

Integrating Third-Party Controls with the Database


A more complex example of a third-party control is a tree control similar to the one used within Iron Speed Designer or
in Windows Explorer. In the context of a database intensive web-application, such a tree control is only useful when
integrated with the underlying data. Iron Speed Designer allows such controls to be integrated into applications,
making it easy to leverage that integration in new applications once the set-up is complete.
This example shows how to integrate a third-party tree control with an Iron Speed Designer application. The tree
control is initialized with data from the database and the navigation URLs are set based on the Ids of the records
retrieved from the database.
The integration of third-party controls can be accomplished in many different ways. In this example, the integration is
accomplished by writing Visual Basic code and including it in HTML layout page file. This code will be included in the
generated ASPX page and executed on the server to create the tree control.
This sample also uses a frame based window to show a top frame and a left and a right frame within the bottom frame
for an application.

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

Dim prodCatFk As IronSpeed.Base.Data.ForeignKey = _


ProductsAccess.Instance.TableDefinition.GetForeignKey( _
ProductsAccess.Instance.CategoryIDColumn)
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)
Dim f As New IronSpeed.Base.Data.ForeignKeyValueFilter( _
prodCatFk, _
catRecord.GetID(), _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Equals)
Dim prodRecords As ArrayList = ProductsAccess.Instance.GetList( _
f, _
Nothing, _
0, 20, Nothing)
Dim prodRecord As ProductsRecord
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
</script>
<table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"
id="AutoNumber1">
<tr>
<td>
<ASP:Label id="iTree" runat=server text="<%# CreateTree() %>" />
</td>
</tr>
</table>

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

<ASP:Label id="iTree" runat=server text="<%# CreateTree() %>" />


</td>
</tr>
</table>

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.

Replacing Controls Generated by Iron Speed Designer


In some cases, it is desirable to replace the controls generated by Iron Speed Designer with different controls. For
example, you might wish to replace the TextBox control generated for FieldValue tags with a MyTextBox control and
do this uniformly throughout all of your applications. There are several ways of doing this.

z Page 483

Option 1: Change BaseClass Library Control to Inherit from Third-Party Control


With this option, change the Iron Speed BaseClass library control you wish to replace to inherit from the replacement
third-pary control. Your third-party control should in turn inherit from the .NET Frameworks control upon which the
BaseClass library control originally inherited. Said another way, you are inserting your third-party control between the
BaseClass library control and the .NET Framework control.
Using this method, all of the Iron Speed Designer controls will have the .NET, third-party, and BaseClass library
functionality combined.
Option 2: Create a New FieldValue type
The new FieldValue type could be used directly in a layout page, for example by including:
<BaseClasses:MyNewFVClass... />
in the layout page. Your new type would automatically load and save data at all of the correct times. It could also be
affected by code customization. However, Iron Speed Designer itself would be unaware of this new FieldValue type,
so it would operate independently of the GEN:FieldValue tags, tag property setting in Iron Speed Designer, producerconsumer events set in Iron Speed Designer, etc.
Creating a new FieldValue type could be done from scratch, though you might find it easier to:
1. Copy the Iron Speed BaseClass librarys FieldValueTextBox control class, wor whichever existing type is
"closest" in implementation for your desired purpose.
2. Rename the copied class.
3. Change the copied class to inherit from the third-party control.
4. Modify, if necessary, the implementation of the GetValue, SetValue, and other methods to attach those
methods to the correct "data" in the base class, i.e. the 3rd-party control.
Option 3: Include the Third-Party Control in the Layout Pages Directly
You can customize the page(s) code-behinds to manually load and save database data to and from the third-party
control at the appropriate times. The custom code for this will vary in complexity depending on the type, contents, and
nesting of the page's server controls.
Option 4: Include the Third-Party Control in the Layout Pages Adjacent to Regular FieldValue Tags
Set the FieldValue tag to be invisible via the Properties dialog, and use single value data binding and/or code
customization to make sure data/selection changes to the controls automatically propogate to the other control. The
custom code for this will also vary in complexity, but is probably easier than including the third-party control in the
layout pages directly.

z Page 484

Making API Calls to Your Application


For example, after a user has successfully signed in, you can programmatically obtain the User Name of the person
who has signed in. The User ID is stored in a hash table session variable named LoginInfo. The particular index into
the hash table is UserId. Hence, you can access the User ID with ASP code like this:
<% Response.Write( "User:" & Session("LoginInfo" )("UserId") ) %>

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

CREATING AND CUSTOMIZING PAGE TEMPLATES


Using Iron Speed Designer, you can automatically create hundreds of web pages based on your own design, or you
can create standard pages using page templates provided with the tool.
Automated production of web pages process imposes organization and structure upon the hundreds of pages that may
be necessary for your application. Not only does this structure allow Iron Speed Designer to do most of the work, it
helps the development team organize and keep track of what pages are needed, and the functionality required.
Page Types
Iron Speed Designer utilizes three different types of pages:
Page Templates These master HTML pages are used to automatically create layout pages with Iron Speed
Designer. This automatic layout page creation process is enabled by a special set of code generation tags that are
used to automatically create layout pages. Also, Page templates can include standard code generation tags that are
replaced when the application is built.
Layout Pages These HTML pages are used by Iron Speed Designer when generating the application. They include
code generation tags that are replaced with references to .NET controls when the application code is written.
ASPX Pages Created by Iron Speed Designed these Active Server Pages are used by the server to dynamically
create and display pages requested by an end users browser.

Page
Templates

Layout
Pages

ASPX
Pages

Created by the developer

Can be created by the


developer or Iron Speed
Designer.

Created by Iron Speed


Designer

Contain HTML, code


generation tags & special code
generation tags used by Iron
Speed Designer to
automatically create layout
pages

Contain HTML &


code generation tags

Contain HTML & references to


databound .NET controls in
place of code generation tags

z Page 486

Typically used to create


hundreds of C/R/U/D pages for
records and tables.

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.

A Show Table page rendered with the Everest design theme.

z Page 488

A Show Table page rendered with the Matterhorn design theme.

A Show Table page rendered in the McKinley design theme.


If you plan on creating your own page layouts, we recommend you start with a copy of the Vanilla template and
continue to enhance it iteratively until you are satisfied.

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

This layout specifies the highlighted state of an individual menu item.

Pagination

The pagination panel containing a number of controls including previous


page, first page, next page, last page, a text box to enter the number of
records to display and an indicator showing the page you are on currently.

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

This section contains information about:

Whats in a Page Template?

Adding and Modifying Page Templates

Style Sheets

Placing ASP.NET Directives in Page Template Files

Whats in a Page Template?


Page template files specify the layout the look and feel of the page. Page template files are just HTML files that
have been enhanced with code generation tags. They specify the graphics and organization that will be used on
layout pages created by Iron Speed Designer and ultimately the ASPX pages derived from these layout pages.
Each page template uses a set of common component files that are used by other page template files belonging to the
same design theme. For example, the button on the Add Record, Edit Record, and Show Record pages of the Everest
design theme files is specified in a separate component layout page file called Button-Everest.html.
When a new page is created based on a page template, all of the components included on the page are also copied
into the OtherComponents folder and will be created as ASCX controls when the application is built. As discussed
earlier, these panels are reusable components used by the page templates. It is not necessary that you use reusable
panels within the page templates you create.
In addition to the regular set of code generation tags, page templates can also use a few special code generation tags.
These special code generation tags help the Application Builder create layout pages based on the page template.
By convention, the type and the name of the code generation tag determines the property settings. For example, if
there is a GEN:Image code generation tag with Logo as the name, the Application Builder uses this information to set it
to logo.gif in the folder containing images belonging to the theme. In this example, the logo is set to:
../Images/Everest/Logo.gif

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.

Adding and Modifying Page Templates


You may create new page templates or modify existing ones. The best way to create a new page template is to start
with an existing one and modify it to meet your needs.

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

A template file that allows you to create a layout page


that can be used to add a new record to the database.

EditOneRecord

A template file that allows you to create a layout page


that can be used to edit an existing record from the
database in a table.

EditMultipleRecords

A template file that allows you to create a layout page


that can be used to edit multiple records from the
database.

ViewOneRecord

A template file that allows you to create a layout page


that can be used to view one record from the
database.

ViewMultipleRecords

A template file that allows you to create a layout page


that can be used to view multiple records from the
database in a table.

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

Code Generation Tag

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:

Record Page Templates

Table Page Templates

Record Page Templates


The Add Record, Edit Record or Show Record page templates are based on exactly the same page layout. The the
code generation tags property settings determines whether the page functions as an Add Record, Edit Record or
Show Record page. Iron Speed Designer determines the type of the template using the GEN:Template code
generation tag.
The Vanilla page template for Add Record is shown below. Each of the code generation tags is discussed in detail
following the page template.
<!-- Start AddRecord-Vanilla.html -->
<!-- Template Tag to Specify the kind of page this is to the binder -->
<GEN:Template Type="AddOneRecord" />
<!-- Start Logo Table -->
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td><GEN:Image Name="Logo" /></td>
</tr>
</table>
<!-- End Logo Table -->
<!-- Start Menu -->
<GEN:Menu Name="Menu" file="../OtherComponents/Menu-Vanilla.html" />
<!-- End Menu -->

z Page 493

<!--Start Record Table -->


<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<GEN:Record Name="Record">
<!-- Start Dialog Table -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><GEN:Image Name="DialogIcon" /><GEN:Html Name="DialogTitle" /></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td>
<%= Me.SystemUtils.GenerateEnterKeyCaptureBeginTag(Me.FindControl("V_CancelButton")) %>
<%= Me.SystemUtils.GenerateEnterKeyCaptureBeginTag(Me.FindControl("V_OKButton")) %>
<!-- Start Actual Table Section -->
<table align="center" cellpadding="0" cellspacing="3" border="0">
<GEN:ForEach Name="Record">
<tr>
<td><GEN:FieldLabel Name="FieldValueLabel" /></td>
<td><GEN:FieldValue Name="FieldValue" /></td>
</tr>
</GEN:ForEach>
</table>
<!-- End Actual Table Table -->
<%= Me.SystemUtils.GenerateEnterKeyCaptureEndTag(Me.FindControl("V_OKButton")) %>
<%= Me.SystemUtils.GenerateEnterKeyCaptureEndTag(Me.FindControl("V_CancelButton")) %>
</td>
</tr>
<GEN:ForEach Name="OneToManyTable">
<tr>
<td>
<!-- Start of "1" One-To-Many Table View -->
<!-- Start Button Bar Table for One-To-Many -->
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<GEN:ForEach Name="ButtonBar">

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 is based on the convention as shown below:


%ISD_DEFAULT%<Table Name>%<Field Name>

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.

Table Page Templates


The Show Table and Edit Table page templates are based on exactly the same page layout. The code generation
tags properties determines whether the page contains a Save button to save the data on the page for editable tables.
Iron Speed Designer determines the type of the template using the GEN:Template code generation tag.
The Vanilla page template for the Show Table page is shown below. Each of the code generation tags is discussed in
detail following the page template.
<GEN:Template Type="ViewMultipleRecords" />
<!-- BEGIN Vanilla\Page.html -->

z Page 498

<!-- Start Logo Table -->


<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<GEN:Image Name="Logo" />
</td>
</tr>
</table>
<!-- End Logo Table -->
<!-- Start Menu -->
<GEN:Menu Name="Menu" file="../OtherComponents/Menu-Vanilla.html" />
<!-- End Menu -->
<!-- Start Button Bar Table -->
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<GEN:ForEach Name="ButtonBar">
<td><GEN:Button Name="ButtonBar" file="../OtherComponents/Button-Vanilla.html" /></td>
</GEN:ForEach>
</tr>
</table>
<!-- End Button Bar Table -->
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td>
<div align="left">
<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>
<!-- Start Filter Component Table -->
<table cellspacing="0" cellpadding="0" border="0" width="100%">

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

<td <GEN:Align Name="AlignGrandTotal" />><GEN:FieldStatistic name="GrandTotal" Type="AllPages" /></td>


</GEN:ForEach>
</tr>
<!-- End Grand Total Row -->
</GEN:Group>
</GEN:Table>
</table>
<%= Me.SystemUtils.GenerateEnterKeyCaptureEndTag(Me.FindControl("V_ForEachButtonBar1Button")) %>
</td>
</tr>
</table>
</div>
</td>
</tr>
</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 Vanilla\Page.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="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

<td><GEN:Button Name="ButtonBar" file="../OtherComponents/Button-Vanilla.html" /></td>


</GEN:ForEach>

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.

Placing ASP.NET Directives in Page Template Files


You can place ASP.NET directives in design them files by inserting @Register directives at the very beginning of the
page template file. The @Register directives can occur anywhere in page template files as long as they are placed
before the first use of a tag prefix, i.e., they must precede the <HTML> tag in the page template file, before the first use
of a tag prefix. This allows you to freely mix ASP.NET controls in theme files by following this simple rule.
For example, you may have an existing web page header and footer, which were developed using Visual Studio .NET
as web user controls. To include these header and footer web user controls, and potentially other web user controls,
in an application built with Iron Speed Designer, you can customize a copy of the appropriate Iron Speed Designer
page template to include these controls.
By way of example, insert the following into the Page page template file before the <HTML> tag:
<%@ Register TagPrefix="MyControl" TagName="Header" Src="/20001/Common/Controls/Borders/Header.ascx" %>
<%@ Register TagPrefix="MyControl TagName="Footer" Src="/20001/Common/Controls/Borders/Footer.ascx" %>

Where the header to be inserted is:


<MyControl:Header
id="Header"
runat="server">
</MyControl:Header>

z Page 506

and the footer to be inserted is:


<MyControl:Footer
id="Footer"
runat="server">
</MyControl:Footer>

z Page 507

GENERATING YOUR OWN CUSTOM CODE


You can easily extend Iron Speed Designer to generate custom code of your own in addition to or as a replacement for
code that is normally generated by Iron Speed Designer. This process is different from modifying the application
because extending Iron Speed Designer itself to generate your custom code affects all applications you generate in
the future.
The code generated by Iron Speed Designer is driven by a set of code template files that contain the parameterized
code that will be generated for various aspects of your application. You can find these code template files in:
\<Iron Speed Designer>\Designer\CodeGenerator\Templates
Underneath the Templates directory are other folders for the different categories of code generated by Iron Speed
Designer. For example, to modify the code generated for generated page class files, you would modify this code
template file.
\<Iron Speed Designer>\Designer\CodeGenerator\Templates\UI\PageGenClass.aspx.vb.txt

C:\Iron Speed\Engineering\User's Guide V1.6\Part VII.doc

z Page 508

PART VII: CODING EXAMPLES AND LAYOUT PAGE


TUTORIALS

PART VII: CODING EXAMPLES AND LAYOUT PAGE TUTORIALS......................................... 1


Tutorials and Examples Overview ........................................................................................................ 4
Displaying Data....................................................................................................................................... 5
Display a Record...................................................................................................................................................5
Display a Record with fields using checkboxes ....................................................................................................7
Display a Record with fields using radio buttons ..................................................................................................9
Display a Record with fields using dropdown list ................................................................................................12
Display images from a database.........................................................................................................................14
Display images based on URLs from a database...............................................................................................16

Adding and Editing Data ...................................................................................................................... 20


Edit Record Page ................................................................................................................................................20
Add Record Page................................................................................................................................................23

Displaying Tables ................................................................................................................................. 27


Display a table of records....................................................................................................................................27
Display a table with search .................................................................................................................................29
Display a table with a range filter ........................................................................................................................31
Display a table with sortable column headings ...................................................................................................33
Display a table with page and grand totals .........................................................................................................36

Advanced Tables .................................................................................................................................. 39


Display a table with alternating rows...................................................................................................................39
Display a table with different alternating rows.....................................................................................................41
Display a table with multiple fields within a column ............................................................................................44
Display a table with multiple fields within a sortable column ..............................................................................45
Display a Table within a Table ............................................................................................................................47

Master Detail Pages.............................................................................................................................. 54


Display a master-detail page...............................................................................................................................54

Advanced Pages ................................................................................................................................... 57


Display Record with Search for a Record ...........................................................................................................57
Display Record with Search and Pagination.......................................................................................................59

Dashboard Pages ................................................................................................................................. 63


Dashboard Page .................................................................................................................................................63

509

Dashboard Page with Advanced Queries ...........................................................................................................66

Advanced Page Features ..................................................................................................................... 72


Changing a Dialog Title.......................................................................................................................................72
Changing Page Titles..........................................................................................................................................73
Keeping a Page On-Screen After Clicking Save ..............................................................................................74
Adding Multiple Menus to a Page .......................................................................................................................75
Creating a Large List Selector.............................................................................................................................77
Using a Large List Selector .................................................................................................................................79
Moving the Sign-in Control to Another Directory.................................................................................................82

User Interface Coding Examples......................................................................................................... 84


Adding Custom Data Validation Code ................................................................................................................84
Customizing the Default Error Message ........................................................................................................84
Customizing Data Validation Logic ................................................................................................................85
Validating a Field Value Immediately After Entering Text .............................................................................88
Disabling Concurrency Validation for a Single Page .....................................................................................88
Pre-Setting Field Values .....................................................................................................................................89
Setting One Field Value when Another Field is Selected ..............................................................................89
Pre-Selecting Field Values Based on Logged-In User ..................................................................................91
Pre-Setting Field Values of New Records .....................................................................................................92
Customizing the Sort Order of Field Value Items ..........................................................................................95
Conditionally Displaying Components ................................................................................................................96
Conditionally Hiding User Interface Controls .................................................................................................96
Conditionally Displaying Components by Search Result...............................................................................99
Conditionally Displaying Tables by Search Result ......................................................................................101
Conditionally Displaying Table Columns .....................................................................................................101
Conditionally Formatting Table Text Colors.................................................................................................102
Removing ** Please Select ** from Radio Button List (or Dropdown List) ..................................................102
Adding and Displaying Data..............................................................................................................................105
Adding Multiple Records at One Time .........................................................................................................105
Using XML-Encoded Record Identifiers Passed via URL............................................................................109

Adding, Filtering and Sorting Data ................................................................................................... 111


Programmatically Accessing Database Records ..............................................................................................111
Adding New Records ...................................................................................................................................111
Updating Existing Records...........................................................................................................................113
Updating Existing Records from a Windows Application.............................................................................114
Creating Custom Table Columns.................................................................................................................115
Calling Your Own Database Stored Procedures .........................................................................................117
Creating a DataTable Object to use with Third-Party Controls....................................................................121
Filtering Data.....................................................................................................................................................122
Customizing Table Component Filtering......................................................................................................122
Accessing Records with Filtered Queries ....................................................................................................125
Application-Wide Middle-Tier Filtering .........................................................................................................127
Filtering Dropdown List Box Content ...........................................................................................................129
Filtering a Show Table Page using a Field Not in the Table........................................................................133
Filtering in the Database Tier vs. Middle Tier ..............................................................................................137
Sorting Data ......................................................................................................................................................138

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

Security and Authentication Coding Examples............................................................................... 144


Customizing Sign In and Sign Out Page Appearance ......................................................................................144
Customizing Page Security Enforcement .........................................................................................................144
Customizing Application Authentication Behavior ............................................................................................145
Implementing Integrated Windows Authentication (Single Sign In) ..................................................................145
Storing Extra Information at Sign-In Time.........................................................................................................149

Third-Party Integration Coding Examples........................................................................................ 151


Generating Crystal Reports Documents ...........................................................................................................151
Using Microsofts Calendar Control to Pick Dates ............................................................................................158
Using External DLLs in Applications ................................................................................................................161
Sending Email from an Application ...................................................................................................................162
Making Your Application a Web Service...........................................................................................................162
Calling an External Web Service from a Data Access Class............................................................................166

z Page 511

TUTORIALS AND EXAMPLES OVERVIEW


This section contains a number of tutorials and examples to help you learn the power of Iron Speed Designer.
The focus of each tutorial is on showing you how to use Iron Speed Designer to implement various features in your
application. The tutorials do not focus on how to create great looking layout pages; so each page uses the simplest
HTML necessary to show the functionality of the code generation tags and not to distract from their use. You or a web
designer can create great looking web pages by incorporating the code generation tags shown in the tutorials within
your layout page. You can also use the page templates feature of Iron Speed Designer to generate great looking web
pages.
The tutorials are organized to show successively more complex features.
Many of the examples use the Southwind sample database. The Southwind sample database is a copy of the
Northwind sample database that is shipped with Microsoft SQL Server with some minor differences. The Southwind
database contains data about a hypothetical store including tables for customers, employees, products, orders, and
order details. The PhotoPath field of the Employees table in the Southwind database has been modified to provide an
image file name for each of the employees in the database. This is used in one of the tutorial examples shown below.
Other examples can be built using the Northwind database as well.
The sample layout and properties files used in these chapters are installed in the Iron Speed Designer directory in the
Tutorials sub-directory.
This section contains information about:

Displaying Data

Advanced Pages

Adding and Editing Data

Dashboard Pages

Displaying Tables

Advanced Page Features

Advanced Tables

User Interface Coding Examples

Master Detail Pages

Adding, Filtering and Sorting

Third-Party Integration Coding Examples

z Page 512

DISPLAYING DATA
This section contains these examples:

Display a Record

Display a Record with fields using checkboxes

Display a Record with fields using radio buttons

Display a Record with fields using dropdown list

Display images from a database

Display images based on URLs from a database

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

Layout Page File

DisplayRecord.html

Properties File

DisplayRecord.xml

Code Generation Tags Used

GEN:Record and GEN:FieldValue

z Page 513

Generated Page

Layout Page File


&nbsp;
<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>
</GEN:Record>
</div>

Procedure
Step 1: Set the properties for the Product tag.

z Page 514

Tag Property

Setting

Code generation tag

Product

Table, view or query

Products

From URL query string parameter

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.

Display a Record with fields using checkboxes


This example displays a field as a checkbox instead of text. An HTML layout page is created with one FieldValue
code generation tag for each database field to be displayed. This example illustrates:
1. How different FieldValue tags can display data in different formats.
2. How a checkbox can be displayed for a Boolean field.
Description
Attribute

Description

Layout Page File

DisplayCheckbox.html

Properties File

DisplayCheckbox.xml

z Page 515

Attribute

Description

Code Generation Tags Used

GEN:Record and GEN:FieldValue

Generated Page

Layout Page File


Note: The layout page file for displaying a value as a literal, checkbox, radio button or drop down list is exactly the
same. Set the display type property in the Properties dialog.
&nbsp;
<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>

z Page 516

<td style="font-weight: bold">


<GEN:FieldValue Name="UnitsInStock" />
</td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Discontinued:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="Discontinued" />
</td>
</tr>
</table>
</GEN:Record>
</div>

Procedure
Step 1: Set the display style property for the Discontinued field.
Tag Property

Setting

Code generation tag

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.

Display a Record with fields using radio buttons


This example displays a field as a set of radio buttons instead of text. An HTML layout page is created with one
FieldValue code generation tag for each database field to be displayed. This example illustrates:
1. How different FieldValue tags can display data in different formats.

z Page 517

2. How a set of radio buttons can be displayed for a Boolean field.


Description
Attribute

Description

Layout Page File

DisplayRadiobuttons.html

Properties File

DisplayRadiobuttons.xml

Code Generation Tags Used

GEN:Record and GEN:FieldValue

Generated Page

Layout Page File


Note: The layout page file for displaying a value as a literal, checkbox, radio button or drop down list is exactly the
same. Set the display type property in the Properties dialog.
&nbsp;
<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>

z Page 518

<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>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Discontinued:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="Discontinued" />
</td>
</tr>
</table>
</GEN:Record>
</div>

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

Code generation tag

Discontinued

Display Style

Radio Button List

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.

Display a Record with fields using dropdown list


This example displays a field as a drop down list instead of text. An HTML layout page is created with one FieldValue
code generation tag for each database field to be displayed. This example illustrates:
1. How different FieldValue tags can display data in different formats.
2. How a drop down list can be displayed for a Boolean field.
Description
Attribute

Description

Layout Page File

DisplayDropdown.html

Properties File

DisplayDropdown.xml

Code Generation Tags Used

GEN:Record and GEN:FieldValue

Generated Page

Layout Page File


Note: The layout page file for displaying a value as a literal, checkbox, radio button or drop down list is exactly the
same. Set the display type property in the Properties dialog.
&nbsp;
<div align="center">
<GEN:Record Name="Product">
<table cellpadding="5" style="border-collapse: collapse" border="1"
bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">

z Page 520

<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>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">Discontinued:</td>
<td style="font-weight: bold">
<GEN:FieldValue Name="Discontinued" />
</td>
</tr>
</table>
</GEN:Record>
</div>

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

Code generation tag

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.

Display images from a database


This example displays an image based on a binary image field from a database. An HTML layout page is created
with one FieldValue code generation tag for each database field to be displayed. This example illustrates:
1. How different FieldValue tags can display data in different formats.
2. How to display an image stored in the database.
3. How to use the Properties tab in the Properties dialog to specify pass-through attributes.
Description
Attribute

Description

Layout Page File

EmployeePhoto.html

Properties File

EmployeePhoto.xml

z Page 522

Code Generation Tags Used

GEN:Record and GEN:FieldValue

Generated Page

Layout Page File


&nbsp;
<div align="center">
<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" />&nbsp;<GEN:FieldValue Name="LastName" />
</td>
<td>

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

Code generation tag

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

Display images based on URLs from a database


This example displays an image based on the image URL from a database. An HTML layout page is created with
one FieldValue code generation tag for each database field to be displayed. This example illustrates:

z Page 524

1. How different FieldValue tags can display data in different formats.


2. How to use the Properties tab in the Properties dialog to specify pass-through attributes.
3. How to enclose the field value in an HTML IMG tag.
Description
Attribute

Description

Layout Page File

EmployeePhotoURL.html

Properties File

EmployeePhotoURL.xml

Code Generation Tags Used

GEN:Record and GEN:FieldValue

Generated Page

Layout Page File


&nbsp;
<div align="center">

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" />&nbsp;<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

Code generation tag

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

Code generation tag

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

Step 4: Build the application.


Step 5: Open a new browser and enter this URL to display the page:
http://localhost/Tutorial/Tutorial%20Pages/EmployeePhotoURL.aspx

z Page 527

ADDING AND EDITING DATA


This section contains these examples:

Edit Record Page

Add Record Page

Edit Record Page


This example shows a series of fields as text boxes and allows the application user to edit and save the record. An
HTML layout page is created with one FieldValue code generation tag for each database field to be displayed. This
example illustrates:
1. How different FieldValue tags can display text boxes for the application user to enter the data.
2. How the OK button is set to save the record and how the Cancel button is configured to go back to the
previous screen.
Description
Attribute

Description

Layout Page File

EditRecord.html

Properties File

EditRecord.xml

Code Generation Tags Used

GEN:Record and GEN:FieldValue

Generated Page

z Page 528

Layout Page File


Note: The layout page file for displaying or editing a record is the same. Specify the editable property for a code
generation tag in the Properties dialog. You also need to set the button tags properties to save the record data when
clicked.
&nbsp;
<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>
</GEN:Record>&nbsp;
<GEN:PushButton Name="OK"/>&nbsp;
<GEN:PushButton Name="Cancel"/>
</div>

Procedure
Step 1: Set the display style property of the editable fields to Text Box.

z Page 529

Tag Property

Setting

Code generation tags

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

Code generation tag

OK

Button Text

OK (or something else you prefer such as Save)

Validate page data

True (if validation is necessary on the fields shown on the page)

Action

Update Data
This indicates to the application that data must be added or updated in the
database.

Send notification event to

Page
This indicates that all records on the page must be updated.

Redirect URL

URL of the page you want to go upon success. If validation is required


and successful, the application user will be sent to this URL after the data
is updated or added into the database.

Step 3: Set the Cancel buttons properties.


Tag Property

Setting

Code generation tag

Cancel

Button Text

Cancel

z Page 530

Tag Property

Setting

Validate page data

False
We do not any validation performed upon cancellation.

Action

Refresh Data

Send notification event to

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.

Add Record Page


This example shows a series of fields as text boxes and allows the application user to add a new record to the
database. An HTML layout page is created with one FieldValue code generation tag for each database field to be
added. This example illustrates:
1. How different FieldValue tags can display text boxes for the application user to enter the data.
2. How the OK button is set to add the record and how the Cancel button is set to go back to the previous
screen.
Description
Attribute

Description

Layout Page File

AddRecord.html

Properties File

AddRecord.xml

Code Generation Tags Used

GEN:Record and GEN:FieldValue

z Page 531

Generated Page

Layout Page File


Note: The layout page file for displaying or editing a record is the same. Set the editable property in the Properties
dialog. You also need to set the button tags properties to save the data record when clicked.
&nbsp;
<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>

z Page 532

</tr>
</table>
</GEN:Record>&nbsp;
<GEN:PushButton Name="OK"/>&nbsp;
<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

Code generation tags

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

Code generation tag

OK

Button Text

OK (Or something else you prefer such as Save.)

Validate page data

True (if validation is necessary on the fields shown on the page)

Action

Update Data
This indicates to the application that data must be added or updated in
the database.

Send notification event to

Page
Indicates that all records on the page must be updated.

z Page 533

Tag Property

Setting

Redirect URL

URL of the page you want to go upon success. If validation is required


and successful, the application user will be sent to this URL after the
data is updated or added into the database.

Redirect Parameters
Step 4: Set the Cancel buttons properties.
Tag Property

Setting

Code generation tag

Cancel

Button Text

Cancel

Validate page data

False
We do not any validation performed upon cancellation.

Action

Refresh Data

Send notification event to

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:

Display a table of records

Display a table with search

Display a table with a range filter

Display a table with sortable column headings

Display a table with page and grand totals

Display a table of records


This example displays a table of records from the database. Each record is displayed in its own row. This example
illustrates:
1. How the Table code generation tag can be used to display a table of records.
2. How the ItemTemplate tag can be used to specify the layout of each row.
3. How the FieldValue tags can be used within the ItemTemplate tag to display fields from the table.
Description
Attribute

Description

Layout Page File

TableDisplay.html

Properties File

TableDisplay.xml

Code Generation Tags Used

GEN:Table, GEN:ItemTemplate and GEN:FieldValue

z Page 535

Generated Page

Layout Page File


&nbsp;
<div align="center">
<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>

z Page 536

</table>
</GEN:Table>
</div>

Procedure
Step 1: Set the data binding properties for the Properties tag.
Tag Property

Setting

Code generation tag

Products

Table, view or query

Products

Default table size

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.

Display a table with search


This example creates a search control to search within a table.
Description
Attribute

Description

Layout Page File

TableSearch.html

Properties File

TableSearch.xml

Code Generation Tags Used

GEN:SearchFilter and GEN:PushButton

z Page 537

Generated Page

Layout Page File


&nbsp;
<div align="center">
<GEN:SearchFilter Name="SearchTextBox" />&nbsp;&nbsp;
<GEN:PushButton Name="Search" />
<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>
</div>

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.

Display a table with a range filter


This example creates a range filter control to search within a table.
Layout Page File

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

Code generation tag

OrderDateFilterStart

z Page 539

Tag Property

Setting

Table, view or query

Orders

Field

OrderDate

Operator

Is greater than or equal to

Ignore time when filtering dates

Yes

Display Style

Text Box

Step 3: Set the data binding properties for the End Date filter.
Tag Property

Setting

Code generation tag

OrderDateFilterEnd

Table, view or query

Orders

Field

OrderDate

Operator

Is less than or equal to

Ignore time when filtering dates

Yes

Display Style

Text Box

Step 4: Set the "Go" buttons properties (FilterButton code generation tag).
Tag Property

Setting

Code generation tag

FilterButton

Button Text

Go

Validate page data


Action

Search

Send notification event to

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

Step 6: Build and run the application.

Display a table with sortable column headings


This tutorial displays a table that has sort-able column headings. The column sorting works in the opposite direction if
the application user presses the sort link a second time.
Description
Attribute

Description

Layout Page File

TableHeader.html

Properties File

TableHeader.xml

Code Generation Tags Used

GEN:FieldLabel

z Page 541

Generated Page

Layout Page File


&nbsp;
<div align="center">
<GEN:Table Name="Products">
<table cellpadding="5" style="border-collapse: collapse" border="1"
bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">
<tr style="font-family:Verdana; font-size:10px">
<td>
<GEN:FieldLabel Name="ProductIdLabel" />
</td>
<td>
<GEN:FieldLabel Name="ProductNameLabel" />
</td>
<td>
<GEN:FieldLabel Name="UnitPriceLabel" />
</td>
<td>
<GEN:FieldLabel Name="UnitsInStockLabel" />
</td>
<td>
<GEN:FieldLabel Name="DiscontinuedLabel" />
</td>
</tr>
<GEN:ItemTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td>

z Page 542

<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>
</div>

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

Step 4: Build and run the application.

Display a table with page and grand totals


This example creates a table that displays page and grand totals. The page total is the total for the records shown
on the current page. You can change the number of records displayed per page by setting the Page Size attribute of
the GEN:Table code generation tag.
Description
Attribute

Description

Layout Page File

SubTotalsOnTable.html

Properties File

SubTotalsOnTable.xml

Code Generation Tags Used

GEN:FieldStatistic and GEN:FooterTemplate

Generated Page

Layout Page File


&nbsp;
<div align="center">
<GEN:Table Name="OrderSubTotals">
<table cellpadding="5" style="border-collapse: collapse" border="1"
bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">
<GEN:HeaderTemplate>
<tr style="font-family:Verdana; font-size:10px">

z Page 544

<td align="center">Order Id</td>


<td align="center">Amount</td>
</tr>
</GEN:HeaderTemplate>
<GEN:ItemTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td>
<GEN:FieldValue Name="OrderId" />
</td>
<td align="right">
<GEN:FieldValue Name="SubTotal" />
</td>
</tr>
</GEN:ItemTemplate>
<GEN:FooterTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">
<b>Page Total:</b>
</td>
<td align="right">
<GEN:FieldStatistic Name="PageTotal" Type="Sum" Scope="CurrentPage" />
</td>
</tr>
<tr style="font-family:Verdana; font-size:10px">
<td align="right">
<b>Grand Total:</b>
</td>
<td align="right">
<GEN:FieldStatistic Name="GrandTotal" Type="Sum" Scope="AllPages" />
</td>
</tr>
</GEN:FooterTemplate>
</table>
</GEN:Table>
</div>

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

Code generation tag

Products

z Page 545

Tag Property

Setting

Default page size

Step 2: Build and run the application.

z Page 546

ADVANCED TABLES
This section contains these examples:

Display a table with alternating rows

Display a table with different alternating rows

Display a table with multiple fields within a column

Display a table with multiple fields within a sortable column

Display a table with alternating rows


This example shows how you can have an alternating layout for the rows of a table. In this example, you can specify
the exact same layout, but with a different background color. Later examples show how you can have a completely
different layout for the alternating row.
Description
Attribute

Description

Layout Page File

TableAlternatingRows.html

Properties File

TableAlternatingRows.xml

Code Generation Tags Used

GEN:AlternatingItemTemplate

z Page 547

Generated Page

Layout Page File


&nbsp;
<div align="center">
<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>
<GEN:AlternatingItemTemplate>

z Page 548

<tr bgcolor="#CCFFCC" 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:AlternatingItemTemplate>
</table>
</GEN:Table>
</div>

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.

Display a table with different alternating rows


This example shows how you can have a completely different layout for each alternating row. In this example, each
row alternate between left justification and right justification. This example also shows how you can have create
links to sort by a database field and place it anywhere on the page.

z Page 549

Description
Attribute

Description

Layout Page File

TableAlternatingDifferentRows.html

Properties File

TableAlternatingDifferentRows.xml

Code Generation Tags Used

GEN:AlternatingItemTemplate

Generated Page

Layout Page File


&nbsp;
<div align="center">
<GEN:Table Name="Products">
<table width=400 cellpadding="5" style="border-collapse: collapse" border="1"
bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">

z Page 550

<tr style="font-family:Verdana; font-size:10px">


<td>
<GEN:FieldLabel Name="SortByName" />&#160;
<GEN:FieldLabel Name="SortByPrice" /></td>
</tr>
<GEN:ItemTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td>
<b><GEN:FieldValue Name="ProductName" /></b>
<br />Unit Price:
<GEN:FieldValue Name="UnitPrice" />
<br />In Stock:
<GEN:FieldValue Name="UnitsInStock" /></td>
</tr>
</GEN:ItemTemplate>
<GEN:AlternatingItemTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td align="right" bgcolor="#C0C0C0">
<b><GEN:FieldValue Name="ProductName" /></b>
<br />Unit Price:
<GEN:FieldValue Name="UnitPrice" />
<br />In Stock:
<GEN:FieldValue Name="UnitsInStock" /></td>
</tr>
</GEN:AlternatingItemTemplate>
</table>
</GEN:Table>
</div>

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

Display a table with multiple fields within a column


This example shows how can display multiple fields within a column. For example, you might store the first name and
the last name of a customer in separate database fields, but would like to display them within a column. This can be
accomplished by specifying a layout where the display column contains two GEN:FieldValue tags.
Description
Attribute

Description

Layout Page File

TableCustomLayout.html

Properties File

TableCustomLayout.xml

Code Generation Tags Used

GEN:ItemTemplate

Generated Page

Layout Page File


&nbsp;
<div align="center">
<GEN:Table Name="Products">

z Page 552

<table cellpadding="5" style="border-collapse: collapse" border="1"


bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">
<GEN:ItemTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td>
<b><GEN:FieldValue Name="ProductName" /></b>
<br />Unit Price: <GEN:FieldValue Name="UnitPrice" />
<br />In Stock: <GEN:FieldValue Name="UnitsInStock" /></td>
</tr>
</GEN:ItemTemplate>
</table>
</GEN:Table>
</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.

Display a table with multiple fields within a sortable column


This example shows how you can have column-sorting links to sort by a field anywhere on the page. You can also
sort by fields that are not displayed on the page.
Description
Attribute

Description

Layout Page File

TableCustomLayoutWithSort.html

Properties File

TableCustomLayoutWithSort.xml

Code Generation Tags Used

GEN:ItemTemplate

z Page 553

Generated Page

Layout Page File


&nbsp;
<div align="center">
<GEN:Table Name="Products">
<table cellpadding="5" style="border-collapse: collapse" border="1" bordercolorlight="#C0C0C0"
bordercolordark="#C0C0C0">
<tr style="font-family:Verdana; font-size:10px">
<td>
<GEN:FieldLabel Name="SortByName" />&#160;
<GEN:FieldLabel Name="SortByPrice" /></td>
</tr>
<GEN:ItemTemplate>
<tr style="font-family:Verdana; font-size:10px">
<td>
<b><GEN:FieldValue Name="ProductName" /></b>
<br />Unit Price: <GEN:FieldValue Name="UnitPrice" />
<br />In Stock: <GEN:FieldValue Name="UnitsInStock" /></td>
</tr>
</GEN:ItemTemplate>
</table>
</GEN:Table>

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.

Display a Table within a Table


This example shows how you can have an interior table displayed within each row of an exterior table. Another way to
look at this is adding a one-to-many table inside a one-to-many table. This arrangement works well for displaying
master-detail data within a tabular format.
The result is a Show Record page for the Customers table which contains a one-to-many Orders table which itself
contains a one-to-many Orders Details table.

z Page 555

Generated Page

Layout Page File


<GEN:TABLE NAME="OrdersTable">
<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="OrderIDFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="CustomerID1FieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="EmployeeIDFieldLabel"></GEN:FIELDLABEL>
</td>
<td class="header_cell">
<GEN:FIELDLABEL NAME="OrderDateFieldLabel"></GEN:FIELDLABEL>
</td>

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

Code generation tag

OrderDetails

Table, view or query

OrderDetails

Foreign key relationship

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

Code generation tag

Order_Details

Table, view or query

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

Code generation tag

RecordRowEditButton2
RecordRowViewButton2

Image file (URL)

../Images/Everest/icon_edit.gif

Validate page data


Action

Redirect

Send notification event to

Parent Record

Redirect URL

../OrderDetails/EditOrder_DetailsRecord.aspx?OrderID={0}

Redirect Parameters

ID

Step 7: Set the properties for each FieldValue tag, e.g.:


Tag Property

Setting

Code generation tag

Order_Details

Table, view or query

Order_Details

Display Field

OrderID

Step 8: Build and run the application.


You will now be able to see a one-to-many table inside a one-to-many table.

z Page 561

MASTER DETAIL PAGES


This section contains these examples:

Display a master-detail page

Display a master-detail page


This example shows how you can easily create master-details pages. The detail portion of the page is limited to
displaying records belonging to the master portion. This example also shows how you can utilize the ID of the record
from the parent record instead of getting it from a URL as in earlier examples.
Description
Attribute

Description

Layout Page File

MasterDetailPage.html

Properties File

MasterDetailPage.xml

Code Generation Tags Used

GEN:Table within a GEN:Record

Generated Page

Layout Page File


&nbsp;
<div align="center">

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" />,&nbsp;
<GEN:FieldValue Name="ShipRegion" />&nbsp;
<GEN:FieldValue Name="ShipPostalCode" /><br />
<GEN:FieldValue Name="ShipCountry" /></td>
</tr>
</table>&#160;
<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

Code generation tag

OrderDetails

Table, view or query

OrderDetails

Foreign key relationship

FK_Order_Details_Order
This specifies the foreign key relationship from the Order Details table to the
Order table.

Step 2: Build and run the application.

z Page 564

ADVANCED PAGES
This section contains these examples:

Display Record with Search for a Record

Display Record with Search for a Record


This example shows how to implement a search control on a table and set it to search for specific fields from a table.
The searchable fields do not have to be displayed on the screen. This example also shows how a search text control
can be linked to a search button through the event consumer-producer relationship and how the control must also be
linked to the table.
One of the key ideas shown in this example is the ability to display only one record as a result of the searching. This is
useful if you have unique fields that are being searched. For example, you can create a page which displays a single
invoice based on the invoice number.
Description
Attribute

Description

Layout Page File

SearchProduct.html

Properties File

SearchProduct.xml

Code Generation Tags Used

GEN:SearchFilter with GEN:Table

Generated Page

Layout Page File


&nbsp;
<div align="center" style="font-family:Verdana; font-size:10px">
Search Product:
<GEN:SearchFilter Name="SearchTextBox" />&nbsp;&nbsp;

z Page 565

<GEN:PushButton Name="Search" />


<GEN:Table Name="Product">
<table cellpadding="5" style="border-collapse: collapse" border="1" bordercolorlight="#C0C0C0"
bordercolordark="#C0C0C0">
<GEN:ItemTemplate>
<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>
</GEN:ItemTemplate>
</table>
</GEN:Table>
</div>

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

Code generation tag

Product

z Page 566

Tag Property

Setting

Default page size

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.

Display Record with Search and Pagination


This example expands upon the previous example and adds previous and next buttons to cycle through multiple
records that might be returned as part of a search. This example also demonstrates the use of pagination controls.
Pagination controls, just like search controls, have an invisible paging control and a visible button. When the button
is pressed, it sends an event to the invisible paging control to update the table. This example also shows how to hook
up the producer-consumer relationship for pagination controls.
Description
Attribute

Description

Layout Page File

SearchAndPagination.html

Properties File

SearchAndPagination.xml

Code Generation Tags Used

GEN:SearchFilter
GEN:PagingControl
GEN:PushButton with GEN:Table

z Page 567

Generated Page

Layout Page File


&nbsp;
<div align="center" style="font-family:Verdana; font-size:10px">
Search Product:
<GEN:SearchFilter Name="SearchTextBox" />&nbsp;&nbsp;
<GEN:PushButton Name="Search" /><br/>
<GEN:PagingControl Name="Previous" Type="PreviousPage" />
<GEN:PushButton Name="PreviousButton" />&nbsp;
<GEN:PagingControl Name="Next" Type="NextPage" />
<GEN:PushButton Name="NextButton" />
<GEN:Table Name="Product">
<table cellpadding="5" style="border-collapse: collapse" border="1" bordercolorlight="#C0C0C0"
bordercolordark="#C0C0C0">
<GEN:ItemTemplate>
<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>
</GEN:ItemTemplate>
</table>

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

Code generation tag

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

Code generation tag

PreviousButton
NextButton

Action

Activate

Validate page data

False (not selected)

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 with Advanced Queries

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

Layout Page File

Dashboard.html

Properties File

Dashboard.xml

Code Generation Tags Used

GEN:TableStatistic

Generated Page

Layout Page File


&nbsp;
<div align="center">
<table cellpadding="5" style="border-collapse: collapse" border="1" bordercolorlight="#C0C0C0"
bordercolordark="#C0C0C0">
<tr style="font-family:Verdana; font-size:10px">
<td colspan=3>

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

Code generation tag

TotalProducts

z Page 572

Tag Property

Setting

Table, view or query

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

Code generation tag

CurrentProducts

Table, view or query

Products

Additional Where clause

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

Code generation tag

DiscontinuedProducts

Table, view or query

Products

Additional Where clause

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

Code generation tag

TotalOrders

Table, view or query

Orders

Statistic Type

Count

Step 5: Set the data binding properties for the TotalOrdersAmt code generation tag.
Tag Property

Setting

Code generation tag

TotalOrdersAmt

Table, view or query

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.

Dashboard Page with Advanced Queries


This example shows how to extend the dashboard page from the previous tutorial by creating and utilizing queries that
join multiple tables and views.

z Page 574

Description
Attribute

Description

Layout Page File

Dashboard.html

Properties File

Dashboard.xml

Code Generation Tags Used

GEN:TableStatistic

Other

Queries

Generated Page

Layout Page File


&nbsp;
<div align="center">
<table cellpadding="5" style="border-collapse: collapse" border="1" bordercolorlight="#C0C0C0"
bordercolordark="#C0C0C0">
<tr style="font-family:Verdana; font-size:10px">
<td colspan=3><p align="center">Dashboard<,/p></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>

z Page 575

<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 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

Tables and views

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

Tables and views

Order Subtotals
Orders

z Page 577

Tag Property

Setting

Fields

Orders.OrderID
Orders.OrderDate
Order Subtotals.OrderID
Order Subtotals.Subtotal

Selection criteria

Orders.OrderID is equal to Order Subtotals.OrderID


Orders.OrderDate is greater than or equal to 1/1/1996
Orders.OrderDate is less than 1/1/1997

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

Tables and views

Order Subtotals
Orders

Fields

Orders.OrderID
Orders.OrderDate
Order Subtotals.OrderID
Order Subtotals.Subtotal

Selection criteria

Orders.OrderID is equal to Order Subtotals.OrderID


Orders.OrderDate is greater than or equal to 1/1/1997
Orders.OrderDate is less than 1/1/1998

Step 6: Set the properties for the TotalOrders1996 code generation tag.

z Page 578

Tag Property

Setting

Code generation tag

TotalOrders1996

Table, view or query

Orders 1996

Display Field

Order Subtotals.OrderID

Statistic Type

Count

Step 7: Set the properties for the TotalOrders1996Amt code generation tag.
Tag Property

Setting

Code generation tag

TotalOrders1996Amt

Table, view or query

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

ADVANCED PAGE FEATURES


This chapter contains a variety of examples that illustrate various aspects of custom page layout. They focus on
changes that can be made principally via:

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:

Changing a Dialog Title

Changing Page Titles

Keeping a Page On-Screen After Clicking Save

Adding Multiple Menus to a Page

Creating a Large List Selector

Using a Large List Selector

Moving the Sign-in Control to Another Directory

Changing a Dialog Title


This section contains several basic examples of changing page and dialog panel titles. They illustrate basic HTML
layout page editing and properties file manipulation.
Solution Approach
Pages created from page templates based on the underlying database tables have appropriate titles, such as "Show
Record", "Edit Record", and "Show Table". Use the tags Properties dialog to change the text of the Dialog Title
component.

z Page 580

A dialog page with the dialog title View


Customers.

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

Code generation tag

DialogTitle

HTML

Add Customers
Add any text you wish.

Step 3: Build and run the application.

Changing Page Titles


Solution Approach
The page title is displayed in the web browsers title bar and is controlled by the <Title> tag in HTML. You can easily
specify the page title in the pages Properties dialog.

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

Code generation tag

AddCustomers.html
This is the root node of the Properties dialog tree.

Page title

Add Customers
This can be any text you wish.

Step 3: Build and run the application.

Keeping a Page On-Screen After Clicking Save


Solution Approach
You can keep the same page on-screen after clicking the save button by specifying the Redirect URL in the save
buttons Properties dialog.
Procedure
Step 1: Open the pages Properties dialog and select the OK or Save button code generation tag.
Step 2: Set Redirect URL to Back to take the application user back to the previous page.
Tag Property

Setting

Code generation tag

Save

Button Text

Save

z Page 582

Tag Property

Setting

Validate page data

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.

Send notification event to

Parent Record

Redirect URL

Back
Optionally, you can specify the URL of the current page to refresh the
browser with the same page.

Step 3: Build and run the application.

Adding Multiple Menus to a Page


Solution Approach
In some applications its useful to have more than one menu bar in order to add additional navigation or simply to
break up an otherwise large menu into several smaller ones. Individual menus can be placed anywhere on the page.
Procedure
To add a second menu to a page:
Step 1: Create a new layout page file for the Menu. Include the menu items in both the normal and highlighted states.
You might review the example that shows how to build reusable menu panels in Part VI of this Guide.
Copy and paste the relevant layout elements and then change the names of the new items, similar to the MenuItem2
and MenuItem2Hilited tags below.
<tr>
<td><GEN:Button Name="MenuItem" File="Menu_Item-Everest.html"/></td>
<td><GEN:Button Name="MenuItemHilited" File="Menu_Item_Highlighted-Everest.html"/></td>
<td><GEN:Button Name="MenuItem2" File="Menu_Item-Everest.html"/></td>
<td><GEN:Button Name="MenuItem2Hilited" File="Menu_Item_Highlighted-Everest.html"/></td>
</tr>

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

Step 3: Configure the menus using the Properties dialog.

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

Code generation tag

MenuItem2

Button Text

Save

Validate page data

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.

Send notification event to

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

Code generation tag

MenuItem2Hilited

Button Text

Save

Validate page data

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

Send notification event to

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

Code generation tag

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.

Creating a Large List Selector


Solution Approach
In some applications, the user should be not be forced to manually type the data for a field, but there may be millions
of different values to choose from. In this situation, using a DropDownList is not very desirable. Instead, a standard
Show Table page can be turned into a Large List Selector page by modifying the layout slightly. This example
shows how to create a Product Selector page that can be displayed in a popup window, and that contains links that
will populate a Text Box in the opening page when clicked. The Product Selector page was created by modifying the
layout of the TableSearch page in the Tutorial sample 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>

Step 3: Add the following HTML/DHTML inside the pages layout:


<a
href='javascript:'
onclick='updateTarget(this.returnValue); return false;'
returnValue='<GEN:FieldValue Name="ProductId" />'
>Select</a>

Step 4: Set the ProductId tags display style property to Literal.

z Page 586

Tag Property

Setting

Code generation tag

ProductId

Display style

Literal

Step 5: Build and run the application. The Product Selector page is now ready to use.

Using a Large List Selector


Solution Approach
This example shows how to use the Product Selector page created in the Creating a Large List Selector example in
this Guide. The EditOrder page was created by modifying the layout of the MasterDetailPage page in the Tutorial
sample application.
Procedure
Step 1: Locate and open the layout page file of the page you wish to modify, e.g.:
\Apps\Tutorial\Source\Tutorial Pages\EditOrder.html
Step 2: Add the following client script code inside the pages layout:
<script language=javascript>
<!-function openProductSelector(target)
{
var url = './ProductSelector.aspx?target=' + target;
window.open(url, '', 'width=725, height=485');
}
//-->
</script>

Step 3: Add the following HTML/DHTML inside the pages layout:


<GEN:FieldValue Name="ProductId" />
<a
href="javascript:"
onclick="openProductSelector('<%# Me.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.
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

Code generation tag

ProductId

Display style

Text Box

Step 5: Build and run the application.

z Page 588

z Page 589

Moving the Sign-in Control to Another Directory


This example will show the simplest way to change the location where the SignIn_Control will be generated.
Procedure
Step 1: Locate the Sign-in control properties file:
\MyApp\Source\SignInComponents\SignIn_Control.xml
Step 2: Edit the <GenerateDirectory> tag in the Sign-in control properties file. Specify your own output directory
where the generated sign-in control will be placed, e.g.:
<?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>
<Version>1.4</Version>
<Self>
<Name>SignIn_Control</Name>
<Type>UserControl</Type>
<GenerateDirectory>DirectoryNameForSignInControl</GenerateDirectory>
<Layout>Source\OtherComponents\SignIn_Control.html</Layout>
<DisplayName>SignIn_Control</DisplayName>

z Page 590

<Description>(Description)</Description>
</Self>
</ComponentDefinition>

Step 3: Locate the SignIn_Control.ascx and related code-behind files:


\MyApp\OtherComponents\SignIn_Control.ascx
\MyApp\OtherComponents\SignIn_Control.gen.ascx.vb
\MyApp\OtherComponents\SignIn_Control.safe.ascx.vb
Move them to your DirectoryNameForSignInControl directory:
\MyApp\DirectoryNameForSignInControl\SignIn_Control.ascx
\MyApp\DirectoryNameForSignInControl\SignIn_Control.gen.ascx.vb
\MyApp\DirectoryNameForSignInControl\SignIn_Control.safe.ascx.vb
Step 4: Build and run the application.

z Page 591

USER INTERFACE CODING EXAMPLES


This section contains examples for:

Adding Custom Data Validation Code

Pre-Setting Field Values

Conditionally Displaying Components

Adding Custom Data Validation Code


In many applications, it is useful to add your own data validation logic or extend the validation logic generated by Iron
Speed Designer. This is easily accomplished by modifying the pages safe class.
The code generated for every FieldValue component contains a RequiredFieldValidator, a FieldValueValidator, a
CustomValidator, and a RecordControlCustomValidator. There are several ways to customize the appearance
and/or behavior of any of these validators.
For more detail, see:

Customizing the Default Error Message

Customizing Data Validation Logic

Validating a Field Value Immediately After Entering Text

Disabling Concurrency Validation for a Single Page

Customizing the Default Error Message


You can change the data validation error message by setting the ErrorMessage and Text properties of a Validator
control. The ErrorMessage property of a validation control is displayed in a pop-up window while the Text property is
displayed at the location of the validator on the web page. This property is set at design time, but can be changed via
the tags Properties dialog. To change it, you simply add or modify the pass-through attributes located under the
Properties tab of the FieldValue tag.
The following example illustrates how to change or replace the default error message text for the ProductName field in
the AddRecordValMsg page in the Tutorial application.
Generated Page
If you try to add a new record without a ProductName, you will see something like this:

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

Units in stock are required to process your order.


Enter a custom error message of your choosing.

V_<YourFieldName>RequiredFieldValidator:Text

* + <YourFieldName>
<YourFieldName> is the name of the field.

Step 3: Build and run the application.

Customizing Data Validation Logic


This example illustrates how to customize the validation logic for the ProductName field in the AddRecord page of the
Tutorial application. This function definition overrides the default validateData() function for the embedded record row.
It checks whether the current field is the Quantity field, and if so, performs special validation to ensure that the quantity

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

Case "wrong", "incorrect"


Return False 'The specific values "wrong" and "incorrect" are invalid
End Select
End If
Return MyBase.ValidateData(v)
End Function

Step 3: Build and run the application. The page will now prevent records from being added with the Product Name
wrong or incorrect.

Validating a Field Value Immediately After Entering Text


This example validates the pages data as soon as the application user changes the value of a field. The page is
validated the same way it would be if a button that causes validation were clicked. This example modifies the
AddRecord page of the Tutorial application to validate when the Product Name is changed.
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_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 validates the page 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.Page.Validate()
End Sub

Step 3: Build and run the application. The page will now validate automatically when the Product Name is changed.

Disabling Concurrency Validation for a Single Page


This example modifies a page so that the page can save records even if the records concurrency checksums are out
of date (i.e. their data changed while the page was editing them). This example modifies the EditRecord page of the
Tutorial application.

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

Step 3: Build and run the application.

Pre-Setting Field Values


For more detail, see:

Setting One Field Value when Another Field is Selected

Pre-Selecting Field Values Based on Logged-In User

Pre-Setting Field Values of New Records

Customizing the Sort Order of Field Value Items

Setting One Field Value when Another Field is Selected


This example demonstrates how to automatically (re)set the Unit Price field on the AddRecord page of the Tutorial
application whenever the Product Name field is changed. The example resets the Unit Price based on the number of
characters in the new Product Name, but you can modify the sample code to implement your own initialization logic.
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

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

Pre-Selecting Field Values Based on Logged-In User


This example demonstrates how to automatically set the Product Name field based on the identity of the user viewing
the AddRecord page of the Tutorial application. The example uses very simple initialization logic, but you can modify
the sample code to implement your own initialization logic.
It assumes that Role Based Security is configured for the application.
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 updates the V_ProductName control after it has been (re)initialized
Private Sub V_ProductName_LoadedData(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles V_ProductName.LoadedData
If (Me.SystemUtils.IsLoggedIn()) Then
Me.V_ProductName.SetValue("Signed In User: " & Me.SystemUtils.GetLoginId())
Else
Me.V_ProductName.SetValue("Not Signed In")
End If
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:
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

Step 3: Build and run the application.

z Page 599

Pre-Setting Field Values of New Records


This example demonstrates how to automatically pre-set the Unit Price field based on the identity of the user viewing
the AddRecord page of the Tutorial application. The example uses very simple initialization logic, but you can modify
the sample code to implement your own initialization logic.
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 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
Try
If (IsNothing(CType(r, IronSpeed.Base.IRecordWithPrimaryKey).GetID())) Then
Return True
End If
Catch e As System.Exception
End Try
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
Try
Return CType(fvc.GetContainer(), IronSpeed.Base.IRecordComponent).GetRecord(True)
Catch e As System.Exception
End Try
Return Nothing
End Function

z Page 600

'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

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

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

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

Step 3: Build and run the application.

Customizing the Sort Order of Field Value Items


This example demonstrates how to customize the display order of the items in a list style Field Value (e.g. Drop Down
List, Radio Button List, or List Box styles). The example works for Field Values with both enumerated items (i.e.
specified at design time) and automatically generated items (i.e. populated at run time). Specifically, this example
demonstrates how to customize the order of the items in the Discontinued DropDownList in the DisplayDropDown
page of the Tutorial application. The example uses very simple sorting logic, but you can modify the sample code to
implement your own sorting logic.

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

Step 3: Build and run the application.

Conditionally Displaying Components


For more detail, see:

Conditionally Hiding User Interface Controls

Conditionally Displaying Components by Search Result

Conditionally Displaying Tables by Search Result

Conditionally Displaying Table Columns

Conditionally Formatting Table Text Colors

Removing ** Please Select ** from Radio Button List (or Dropdown List)

Conditionally Hiding User Interface Controls


In some applications, it is useful to conditionally display certain controls on a page, typically based on individual user
roles and permissions. Since most of the components generated by Iron Speed Designer are derived from
System.Web.UI.WebControls.WebControl, this can be done programmatically by setting an individual controls Visible
property.

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

'if the specified control is V_ReportsTo, perform extra initialization


CType(fvc, Control).Visible = (fvc.GetValue() <> "0")
End If
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
'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).

Conditionally Displaying Components by Search Result


This example shows how to hide/show the Table in the SearchAndPaginationWithNumbers page of the Tutorial
application when the number of matching records for a search is zero/non-zero.
Generated Page
Before the change:

After the change:

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

Conditionally Displaying Tables by Search Result


This example uses a search box to retrieve fields based upon the information typed into the search box. Unlike a
normal table component that displays results when it is first displayed, the results in this example are displayed only
after the application user enters a term into a search box and clicks Go.
This example defines a "Load" handler in the "Safe" class associated with the Show Table object. In this method, an
If Not Me.IsPostBack() statement is added. Within it, a filter object is defined that initially finds no records until a
search term is entered. The filter is associated with the table's data reader. This filtering logic is invoked only during
the "non-Postback" phase to ensure it only happens the first time a page is loaded. Then, the user's real input will
control the display during the subsequent (Postback) phases.
This example uses the Northwind "Orders" table.
Procedure
Private Sub ListOrders_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Me.IsPostBack Then
filter away all orders (none have EmpID=-1)
Dim ou As New OrdersAccess()
Dim emptyfilter As New IronSpeed.Base.Data.ColumnValueFilter(ou.EmployeeIDColumn, "-1", _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Equals, False)
Me.V_Table.GetDataReader.GetFilter.AddFilter("myFilter", emptyfilter)
Else
' on postback, remove the filter so all data shows and re-bind the control
Me.V_Table.GetDataReader.GetFilter().RemoveFilter("myFilter")
Me.V_Table.DataBind()
End If
End Sub

Conditionally Displaying Table Columns


In some applications, its useful to show or hide table columns for certain application users in a manner configurable by
a system administrator at run-time and not during design-time. Conditionally displaying individual controls (content of
the column) is described in Conditionally Hiding User Interface Controls. This example shows how to hide the column
itself.
Most controls generated by Iron Speed Designer have a Visible property since they are derived from
System.Web.UI.WebControls.WebControl. The generated FieldSortControl is really an invisible control that is
associated with a secondary visible control. In the generated .ASPX code for a column header, you'll see:
<BaseClasses:FieldSortControl runat="server" id="V_CategoryIDFieldLabel"
FieldSortControl="V_CategoryIDFieldLabelButton" Table="HideColumn.CategoriesAccess, HideColumn"
Field="CategoryID"></BaseClasses:FieldSortControl>

z Page 609

<BaseClasses:LinkButton runat="server" id="V_CategoryIDFieldLabelButton" Text="Category ID"


CausesValidation="False"> </BaseClasses:LinkButton>

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

Conditionally Formatting Table Text Colors


This example sets the color of one control based on the value of another. Specifically, if a particular employee reports
to employee number 5, the employee's last name is displayed in red.
This code is inserted in the page's safe class.
Procedure
Protected Overrides Sub InitializeFieldControl(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
MyBase.InitializeFieldControl(fvc)
If (CType(fvc, Control).ID = "V_ReportsToTableFieldValue") Then
'If the employee reports to employeeID 5, make the last name Red
If fvc.GetValue() = "5" Then
Dim fvcLastName As Control = Me.FindControl("V_LastNameTableFieldValue")
If Not IsNothing(fvcLastName) Then
CType(fvcLastName, System.Web.UI.WebControls.Label).ForeColor = Color.Red
End If
'Find other controls and set their color properties as desired
End If
End If
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

'instances instantiated/used by this page/panel.


Public Class CustomRecordControl
Inherits IronSpeed.Base.Web.UI.WebControls.RecordControl
'Protected Overrides Function ValidateData(ByVal v As _
IronSpeed.Base.Web.UI.WebControls.RecordControlCustomValidator) As Boolean
'End Function
' this sub initializes field controls in the Record
Protected Overrides Sub InitializeFieldControl(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
' let default initialization take its course
MyBase.InitializeFieldControl(fvc)
' remove the Please Select radio button from the ReportsTo RadioButtonList
RemovePleaseSelectInReportsTo(fvc)
End Sub
' this sub will check if the given field value control is indeed the RadioButtonList for ReportsTo.
' if is it, then remove the first item from the list (i.e. the "Please Select")
Private Sub RemovePleaseSelectInReportsTo(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
If (Not IsNothing(fvc)) Then
If (CType(fvc, Control).ID = "V_ReportsToTableFieldValue") Then
USE THIS FOR RADIO BUTTON LIST
' take the first item in the radio button list, check if it is "Please Select"
' If it is, remove from the radio button list.
Dim radioButtonList As IronSpeed.Base.Web.UI.WebControls.RadioButtonList = _
CType(fvc, IronSpeed.Base.Web.UI.WebControls.RadioButtonList)
Dim firstListItem As ListItem = radioButtonList.Items(0)
If (firstListItem.Text.IndexOf("** Please Select **") >= 0) Then
radioButtonList.Items.Remove(firstListItem)
End If
' USE THIS FOR DROPDOWN LIST
' take the first item in the dropdown list, check if it is "Please Select"
' If it is, remove from the dropdown list.
'Dim dropDownList As IronSpeed.Base.Web.UI.WebControls.DropDownList = _

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

Step 3: Build and run the application.

Adding and Displaying Data


This section contains these coding examples:

Adding Multiple Records at One Time

Using XML-Encoded Record Identifiers Passed via URL

Adding Multiple Records at One Time


This example shows how to add multiple child records en masse to a new parent record. It uses the sample Northwind
database, and implements functionality that lets the user add all products from a selected supplier to a new order
during order creation. The relevant part of the resulting page should look something like this:

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

Code generation tag

AddGroupButton

Button Text

Add All Items From the Selected Supplier

Validate page data

True

Action

Custom

Custom action

AddSupplierItems

z Page 614

Tag Property

Setting

Send notification event to

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

'' with the new "AddSupplierItems" command


Public Overrides Sub OnIronSpeedEvent(ByVal args As IronSpeed.Base.IronSpeedEventArgs)
' always pass along the event to the base class
MyBase.OnIronSpeedEvent(args)
' if the event is the AddSupplierItems command, handle it
If args.EventType = IronSpeed.Base.IronSpeedEventArgs.EventTypes.Custom AndAlso _
args.CustomEventName = "AddSupplierItems" Then
' our event, handle it
' if a supplier is selected, process
If SupplierList.SelectedItem.Text <> PLEASE_SELECT Then
' a selection has been made, add the matching product records
Dim pu As New ProductsAccess()
Dim pl As ArrayList
Dim pr As ProductsRecord
' create a filter for the specified supplier
Dim supplierFilter As New IronSpeed.Base.Data.ColumnValueFilter(pu.SupplierIDColumn, _
SupplierList.SelectedItem.Value, IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Equals, False)
' Get all the products from the selected supplier (don't care about order)
pl = pu.GetList(supplierFilter, Nothing, 0, Integer.MaxValue)
' iterate over the products and add the records
For Each pr In pl
Dim odr As Order_DetailsRecord
Dim odu As New Order_DetailsAccess()
odr = CType(odu.CreateRecord("newRecord"), Order_DetailsRecord)
' set the reasonable initial values
odr.SetProductIDFieldValue(pr.GetID().ToDisplayString)
' get the Unit Price from the product record
odr.SetUnitPriceFieldValue(pr.GetUnitPriceFieldValue)
' discount = 20%
odr.SetDiscountFieldValue(0.2)
' qty=1
odr.SetQuantityFieldValue(1)
' add the new record object to the Table Control
CType(V_Order_DetailsTable, _
PanelControls.AddOrderRecordWithAllSupplierItems.CustomTableControl).AddRecord(odr)
Next
End If ' if not "Please Select"
End If

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

Step 8: Build and run the application.

Using XML-Encoded Record Identifiers Passed via URL


Record identifiers are passed from page to page via URLs in an XML-encoded format. For example, if you have a
Show Table page with an Edit button, and you set that Edit button to redirect to another page, passing a record
identifier on the URL. Iron Speed Designer generates a URL such as:
http://localhost/MyApp/Categories/EditCategoriesRecord.aspx?Categories=%3ckey+CategoryID%3d%222%22+%2f%3e

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

ADDING, FILTERING AND SORTING DATA


This section contains examples for:

Programmatically Accessing Database Records

Filtering Data

Sorting Data

Audit Trails and Use Tracking

Programmatically Accessing Database Records


In many applications, it is necessary to write code that directly retrieves or updates database data (e.g. in order to
implement custom business rules). Often, this code is called in response to UI actions or used to update the UI, but
the code itself is not necessarily tied to a specific page or UI element. The following examples demonstrate various
ways in which an application developer can write UI-independent data access code to programmatically run simple or
filtered queries, add or update database records, etc.
For more details, see:

Adding New Records

Updating Existing Records

Updating Existing Records from a Windows Application

Creating Custom Table Columns

Calling Your Own Database Stored Procedures

Creating a DataTable Object to use with Third-Party Controls

Adding New Records


This example demonstrates how to write a reusable function that programmatically constructs a database record and
inserts the new record into the database. Specifically, this example creates a Products record. The reusable function
can be called from any page. Although the function is trivial, the purpose is to demonstrate how to programmatically
create new database records. The example code could be easily modified to create multiple records, create records
based on function parameters, etc.

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

'insert the new record into the database


r.Create()
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.

Updating Existing Records


This example demonstrates how to write a reusable function that programmatically edits/updates an existing database
record. Specifically, this example updates a Products record. The reusable function can be called from any page.
Although the function is trivial, the purpose is to demonstrate how to programmatically update database records. The
example code could be easily modified to update multiple records returned by a filtered query, etc.
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:
'This function updates a Products record.
Public Shared Sub UpdateProductRecord()
'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)
End Sub

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.

Updating Existing Records from a Windows Application


This example demonstrates how to create a simple desktop application (written in Visual Basic .NET) to update an
existing database record. The application created uses the Iron Speed BaseClasses.dll and the generated DLL of a
Web application linked to the Northwind databases Products table (the Tutorial application in this example).
Note that parts of this example are similar to the Updating Existing Records example.
Procedure
Step 1: Open Visual Studio.NET and create an empty Windows application.
Step 2: Add a reference to the Iron Speed BaseClasses assembly (i.e. DLL).
1. In the Solution Explorer pane, right-click on the References icon and select Add Reference
2. Click the Browse button and navigate to your applications bin folder (e.g. <Iron Speed
Directory>\Tutorial\bin) and select BaseClasses.dll.
3. Click OK.
Step 3: Add a reference to the generated web applications assembly (i.e. DLL).
1. In the Solution Explorer pane, right-click on the References icon and select Add Reference
2. Click the Browse button and navigate to your applications bin folder (e.g. <Iron Speed
Directory>\Tutorial\bin) and select Tutorial.dll.

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.

Creating Custom Table Columns


This example demonstrates how to customize the Data Access tier of your application so that the entire application
uses a custom class to validate, format, and parse all values for a specific column in a Table. Specifically, this
example demonstrates how to customize your application so that the Unit Price column of the Products table only
accepts positive currency values, and uses a custom display format to display them. The example uses very simple
validation and formatting logic, but you can modify the sample code to implement your own business rules.

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

'overridden to return false for non-positive values


Public Overrides Function IsValidValue(ByVal value As IronSpeed.Base.Data.ColumnValue) As Boolean
value = Me.ConvertToNativeFormat(value)
If (Not MyBase.IsValidValue(value)) Then
Return False
ElseIf (IsNothing(value) OrElse value.IsNull()) Then
Return True
Else
If (System.Convert.ToDouble(value.Value) <= 0) Then
Return False
End If
End If
Return True
End Function
'overridden to put angle brackets around the display string
Public Overrides Function ToDisplayString(ByVal value As IronSpeed.Base.Data.ColumnValue) As String
Return String.Format("<{0}>", MyBase.ToDisplayString(value))
End Function
End Class

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

Step 4: Build and run the application.

Calling Your Own Database Stored Procedures


This example shows how to call your own stored procedures to create a new record, instead of the stored procedure or
in-line SQL generated by Iron Speed Designer.
Use the safe SQL Access class generated by Iron Speed Designer to call your own stored procedure. Safe classes
are created only once and are never overwritten by Iron Speed Designer. If you include your custom code in the
generated class, you will need to re-apply your customizations whenever the file is built.

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

' parameters in the store procedure


'@productid
char(10),
'@category
char(10),
'@name
varchar(80),
'@descn
varchar(255)
' SPECIFY: your stored procedure parameter name, and data access column object
Dim paramColumnPairs As New ArrayList
paramColumnPairs.Add(New Object() {"@productid", productAccess.productidColumn})
paramColumnPairs.Add(New Object() {"@category", productAccess.categoryColumn})
paramColumnPairs.Add(New Object() {"@name", productAccess.nameColumn})
paramColumnPairs.Add(New Object() {"@descn", productAccess.descnColumn})
Dim paramColumnPair As Object()
For Each paramColumnPair In paramColumnPairs

z Page 627

paramName = CType(paramColumnPair(0), String)


col = CType(paramColumnPair(1), BaseColumn)
If ((Not col.IsValuesReadOnly) OrElse col.IsIdentity) Then
obj = columnValues(getcolumnindexbyname(col.InternalName))
paramType = IronSpeed.Base.Data.SqlProvider.SqlProvider.GetParameterType(col.DbDataType, _
myConnection)
param = IronSpeed.Base.Data.SqlProvider.SqlProvider.GetParameter(paramName, paramType, _
myConnection)
If (col.IsIdentity) Then
param.Direction = ParameterDirection.Output
outputParams.Add(param)
Else
If obj Is Nothing Then
param.Value = DBNull.Value
Else
param.Value = IronSpeed.Base.Data.SqlProvider.SqlProvider.GetParameterValue(paramType, obj, _
myConnection)
End If
End If
myCommand.Parameters.Add(param)
End If
Next
myCommand.ExecuteNonQuery()
' Store the values of output parameters. Only implemented for identity columns.
If (outputParams.Count > 0) Then
Dim i As Integer = 0
For Each col In tableProperties.ColumnList
If (col.IsIdentity) Then
param = CType(outputParams.Item(i), IDataParameter)
If Not (param.Value Is DBNull.Value) Then
columnValues(GetColumnIndexByName(col.InternalName)) = param.Value
End If
i=i+1
If (i >= outputParams.Count) Then
Exit For
End If
End If
Next
End If
Me.IsWritable = True
Me.IsValid = True
Me.IsDirty = False

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

Step 3: Build and run the application.

Creating a DataTable Object to use with Third-Party Controls


Many third-party controls, such as data grids, need to be bound to System.Data.DataTable objects. By default, the
Data Access classes generated by Iron Speed Designer do not return DataTable objects. Instead, they return array
lists of record objects. This example shows how to convert an array list of record objects to a DataTable object that
can be used to bind to third-party controls.
In this example, a page named WebForm1.aspx uses an asp:DataGrid control named DataGrid1. You can retrieve the
list of all products from the Products table in the Northwind database and bind the results to DataGrid1 as follows.
Procedure
Step 1: Open the pages code-behind file:
\MyApp\ MyPages\WebForm1.aspx.vb
Step 2: Query for all products, create a DataTable, and bind the results to DataGrid1.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Me.IsPostBack Then
Dim productsList As ArrayList = ProductsAccess.Instance.GetList(Nothing, Nothing, 0, 1000)

z Page 629

Dim dt As DataTable =
ProductsAccess.Instance.CreateDataTable(CType(productsList.ToArray(GetType(ProductsRecord)), ProductsRecord()),
Nothing)
DataGrid1.DataSource = dt
DataGrid1.DataBind()
End If

Step 3: Build and run the application.

Filtering Data
In this section:

Customizing Table Component Filtering

Accessing Records with Filtered Queries

Application-Wide Middle-Tier Filtering

Filtering Dropdown List Box Content

Filtering a Show Table Page using a Field Not in the Table

Filtering in the Database Tier vs. Middle Tier

Customizing Table Component Filtering


This example demonstrates how to customize the filters used to determine which records data is displayed in a Table
component. Specifically, this example demonstrates how to customize the SearchAndPaginationWithNumbers page
of the Tutorial application to display only Products that have EITHER (a Unit Price less than $20) OR (a Unit Price
greater than or equal to $25). This filtering restriction works in addition to the filtering caused by any filter or search
controls on the page. The example uses very simple filtering logic, but you can modify the sample code to implement
your own filtering logic.
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:
'This Handler modifies the V_Product control's DataReader after it is created
Private Sub V_Product_DataReaderCreated(ByVal source As Object, ByVal args As System.EventArgs) _
Handles V_Product.DataReaderCreated
Dim dr As IronSpeed.Base.Data.DataReader = Me.V_Product.GetDataReader()

z Page 630

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

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

Step 3: Build and run the application.

z Page 632

Accessing Records with Filtered Queries


This example demonstrates how to write a reusable function that builds a textual Tree-view of Categories and
Products. The reusable function can be called from any page. Although the functions output is trivial, the purpose is
to demonstrate how to programmatically run queries (both filtered and unfiltered) to access database records and their
data. The example code could be easily modified to initialize some type of graphical Tree control, build HTML for a
menu, etc.
Procedure
Step 1: Locate and open any safe class in your application, e.g.:
\Apps\Tutorial\DataAccess\CategoriesAccess.safe.vb
Step 2: Add the following code inside the safe class:
'This function builds a textual Tree-view of Categories and Products.
'Although the output is trivial, the purpose is to demonstrate how to
'programmatically run queries to access database records.
Public Shared Function CreateProductHierarchyString() As String
Dim sb As New System.Text.StringBuilder()
'Get the ForeignKey object from the Products table that links it to the Categories table
Dim productCategoryFk As IronSpeed.Base.Data.ForeignKey = _
ProductsAccess.Instance.TableDefinition.GetForeignKey( _
ProductsAccess.Instance.CategoryIDColumn)
'Get a list of the first 20 Categories table records (no special sorting or filtering)
Dim categoryRecords As ArrayList = CategoriesAccess.Instance.GetList( _
Nothing, _
Nothing, _
0, 20, Nothing)
Dim categoryRecord As CategoriesRecord
For Each categoryRecord In categoryRecords
'Get data from the CategoriesRecord
Dim categoryName As String = categoryRecord.GetCategoryNameFieldValue()
Dim categoryIdString As String = categoryRecord.GetString(CategoriesAccess.Instance.CategoryIDColumn)
Dim categoryIdKey As IronSpeed.Base.Data.KeyValue = categoryRecord.GetID()
'update the StringBuilder
sb.AppendFormat( _
"+ {0} ({1}, {2})", _
categoryName, _
categoryIdString, _
categoryIdKey.ToString() _

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

Application-Wide Middle-Tier Filtering


This example demonstrates how to customize the Data Access tier of your application so that certain filters are always
used as part of every query run by your application. Specifically, this example demonstrates how to customize your
application so that only Products that have EITHER (a Unit Price less than $20) OR (a Unit Price greater than or equal
to $25) are returned by the ProductsAccess class, regardless of which page is running the query. This filtering
restriction also works in addition to any filtering caused by any filter or search controls on individual pages. The
example uses very simple filtering logic, but you can modify the sample code to implement your own filtering logic.
Note that much of the code for this example is very similar to the code for the Customizing Table Component Filtering
example.
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:
'This Function creates a simple CompoundFilter that matches only Products with ((UnitPrice < 20) OR (UnitPrice >= 25))
Private Shared Function CombineFilters( _
ByVal f1 As IronSpeed.Base.Data.BaseFilter, _
ByVal f2 As IronSpeed.Base.Data.BaseFilter _
) As IronSpeed.Base.Data.CompoundFilter
'Create a CompoundFilter that uses the AND operator
Dim filter As New
IronSpeed.Base.Data.CompoundFilter(IronSpeed.Base.Data.CompoundFilter.CompoundingOperators.And_Operator)
'Add subfilters to the CompoundFilter
If (Not IsNothing(f1)) Then
filter.AddFilter(f1)
End If
If (Not IsNothing(f1)) Then
filter.AddFilter("f2", f2)
End If
Return filter
End Function
'This Function creates a simple CompoundFilter that combines any two other filters
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( _

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

Public Overloads Overrides Function Export( _


ByVal filter As IronSpeed.Base.Data.BaseFilter _
) As String
Dim combinedfilter As IronSpeed.Base.Data.CompoundFilter = _
CombineFilters(CreateSubfilter(), filter)
Return MyBase.Export(combinedfilter)
End Function

Step 3: Build and run the application.

Filtering Dropdown List Box Content


This example filters the content of a dropdown list box whose data comes from a foreign-key accessed field. In this
example, an Add Address Record page generated by the Application Builder in Iron Speed Designer displays an
address type field. The address type values are contained in a separate Address Type table. The data model is as
follows:
address
addresseId

Primary key

addressDesc

address description

addressTypeId

foreignKey into addressType.addressTypeId

addressType
addressTypeId

Primary key

addressTypeDesc

address type description

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

Code generation tag

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

Code generation tag

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

'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
'instances instantiated/used by this page/panel.
Public Class CustomRecordControl
Inherits IronSpeed.Base.Web.UI.WebControls.RecordControl
'Protected Overrides Function ValidateData(ByVal v As
IronSpeed.Base.Web.UI.WebControls.RecordControlCustomValidator) As Boolean
'End Function
Protected Overrides Sub InitializeFieldControl(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
' initialize all field controls normally
MyBase.InitializeFieldControl(fvc)
' in the case of addressTypeId field valuecontrol, filter for status > 0
FilterAddressTypeStatusGreaterThanZero(fvc)
End Sub
Private Sub FilterAddressTypeStatusGreaterThanZero(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
If (Not IsNothing(fvc)) Then
Dim id As String = CType(fvc, Control).ID
' if the fvc is the matching Control ID, and it is indeed a dropdown list
If (id = "V_addressTypeIdFieldValue" AndAlso _
TypeOf (fvc) Is IronSpeed.Base.Web.UI.WebControls.DropDownList) Then
' instantiate a data access class
Dim myAddressTypeAccess As New AddressTypeAccess
' this is the filter to find status greater than Zero
Dim addressTypeStatusGreaterThanZeroFilter As New IronSpeed.Base.Data.ColumnValueFilter( _
myAddressTypeAccess.addressTypeStatusColumn, _
"0", _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Greater_Than, _

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 6: Build and run the application.

Filtering a Show Table Page using a Field Not in the Table


This example shows how to filter a Show Table page (Order Items) based on Customer ID and then by Order ID.
However, Customer ID is not a field in the Order Details table, but is a member of the Customer table. A Customer ID
dropdown filter is added to the layout page file (e.g. ShowOrder_DetailsTable.html).
This example uses the Microsofts Northwind databases Customers, Orders, and Order Details tables.
Procedure
Step 1: Create an Order Items Show Table page (ShowOrder_DetailsTable.html). Make sure to add a filter for Order
ID.
Step 2: In the Order Items Show Table page (ShowOrder_DetailsTable.html), add a dropdown for the Customer ID,
above the Order ID filter:
<tr>
<td width="70" class="filter_area">
<asp:Literal runat="server" id="CustomerLabel" Text="Customer ID"></asp:Literal>
</td>
<td>
<asp:DropDownList runat="server" id="V_CustomerIDFieldFilter" AutoPostBack="True"
CssClass="Filter_Input"></asp:DropDownList>
</td>
</tr>

Step 3: Add the following to the Order Items Show Table pages safe code-behind
(ShowOrder_DetailsTable.safe.aspx.vb):

A declaration for the dropdown filter (Protected WithEvents V_CustomerIDFieldFilter As DropDownList).

A Sub that handles MyBase.Load (e.g. Private Sub ShowOrder_DetailsTable_Load).

A Sub PopulateCustomerFilter().

A Sub that handles V_CustomerIDFieldFilter.SelectedIndexChanged, e.g. Private Sub


V_CustomerIDFieldFilter_SelectedIndexChanged.

In CustomTableControl: Function GetCustomersOrderIds.

In CustomTableControl: Sub UpdateOrderFilter.

' This class was generated by Iron Speed Designer.

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

' data access record for Orders table


Dim orderAccess As OrdersAccess = OrdersRecord.TableUtils
' data record object for Orders
Dim orderRecord As OrdersRecord
' filter for a specific customer id
Dim customerIdFilter As New IronSpeed.Base.Data.ColumnValueFilter(orderAccess.CustomerIDColumn, _
customerId, _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Equals, _
True)
' arraylist of orders for this customer id
Dim ordersList As ArrayList = orderAccess.GetList(customerIdFilter, Nothing, 0, 10000)
' for each record, extract the order Id, i.e. gather list of order id's for this customer
If (Not IsNothing(ordersList) AndAlso ordersList.Count > 0) Then
orderIdsForCustomer = New ArrayList()
For Each orderRecord In ordersList
orderIdsForCustomer.Add(orderRecord.GetID().ColumnValueByName(orderAccess.OrderIDColumn.InternalName))
Next
End If
' return this list of order id's
Return orderIdsForCustomer
End Function
' this function will update the Order filter dropdownlist, based on the given customer id
Public Sub UpdateOrderFilter(ByVal customerId As String)
' find my data reader, and remove the "OrderIdFilter"
Dim myDataReader As IronSpeed.Base.Data.DataReader = Me.GetDataReader()
myDataReader.GetFilter().RemoveFilter("OrderIdFilter")
'if the customer ID is not empty, find his/her orders to filter order items by
If (Trim(customerId).Length > 0) Then
' compound filter for the order Id's, e.g. where order = 1222 or order = 1223 or order = 1224, etc
Dim orderIdsFilter As New
IronSpeed.Base.Data.CompoundFilter(IronSpeed.Base.Data.CompoundFilter.CompoundingOperators.Or_Operator)
' list of order id's for this customer
Dim orderIds As ArrayList = GetCustomersOrderIds(customerId)
If (Not IsNothing(orderIds) AndAlso orderIds.Count > 0) Then
' filter for one column, e.g. where order = 1223
Dim orderIdFilter As IronSpeed.Base.Data.ColumnValueFilter
Dim orderItemsAccess As Order_DetailsAccess = Order_DetailsRecord.TableUtils

z Page 644

Dim orderId As String


For Each orderId In orderIds
' filter for one column, e.g. where order = 1223
orderIdFilter = New IronSpeed.Base.Data.ColumnValueFilter(orderItemsAccess.OrderIDColumn, _
orderId, _
IronSpeed.Base.Data.BaseFilter.ComparisonOperator.Equals, _
True)
' add this to the compound filter of order id's
orderIdsFilter.AddFilter(orderIdFilter)
Next
End If
' add this filter as "OrderIdFilter", for later remove, when needed
myDataReader.GetFilter().AddFilter("OrderIdFilter", orderIdsFilter)
End If
End Sub
End Class
'This control class can be customized to change the behavior of any
'instances instantiated/used by this page/panel.
Public Class CustomRecordControl
Inherits IronSpeed.Base.Web.UI.WebControls.RecordControl
'Protected Overrides Function ValidateData(ByVal v As
IronSpeed.Base.Web.UI.WebControls.RecordControlCustomValidator) As Boolean
'End Function
'Protected Overrides Sub InitializeFieldControl(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
'End Sub
End Class
End Namespace

Step 4: Build and run the application.

Filtering in the Database Tier vs. Middle Tier


The previous examples illustrate the middle tier approach to filtering. But, can filtering also be implemented at the
database tier?
The Application-Wide Middle-Tier Filtering code example constructs a custom filter. The filter (and the sub-filters
within it) generates a SQL "WHERE" clause that gets passed down to the Database tier. Iron Speed Designer
Professional dynamically generates a SQL statement from this WHERE clause at run time. Iron Speed Designer

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:

Paging and Sorting in the Database Tier vs. Middle Tier

Setting the Sort Order for a Table Component

Customizing the Sort Order of Table Components

Paging and Sorting in the Database Tier vs. Middle Tier


Paging and Sorting are both similar to Filtering in that they also pass instructions to the SQL statements or stored
procedures generated by Iron Speed Designer and the actual filtering, sorting, and paging are all done in the Database
tier. This increases query performance because it allows the database to take advantage of database indexes, etc.
and also reduces the amount of data that must be passed from the database to the web server.

z Page 646

Setting the Sort Order for a Table Component


When creating a Table Component, you may want the initial data sorted in a particular order. Generally, data in tables
is automatically sorted by the primary key value, no matter what other settings are in force.
This example shows how a Table Component (ShowAuthorsTable.html) can programmatically set its initial sorting
order. The customization is performed by intercepting the "data reader create" event. The event delegate function
gets the data reader and configures with columns on which to perform sorting. The event delegate function is
ShowAuthorsTable.Handle_TableDataReaderCreated.
Procedure
Step 1: Locate and open the safe class file for the Table Component to be modified, e.g.:
\<Application Folder>\Authors\ShowAuthorsTable.safe.vb
Step 2: Create a handler for the data reader create event similar to the one shown below.
Public Class ShowAuthorsTable
Inherits ShowAuthorsTableGen
'Provide a delegate function for "table data reader created event'
Protected Sub Handle_TableDataReaderCreated(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles V_Table.DataReaderCreated
SetSortByLastName()
End Sub
'configure the table's data reader with the column to sort
Private Sub SetSortByLastName()
'Get the DataReader, since we already know datareader has been created
Dim dr As IronSpeed.Base.Data.DataReader = V_Table.GetDataReader()
'Parameters for SqlBuilderSortOrder constructor are as follows:
'bExpandForeignKeyColums - boolean, whether to expand foreign key columns
'bIsCaseInSensitive - boolean, whether to perform case insensitive comparison
Dim sortOrder As New IronSpeed.Base.Data.SqlBuilderSortOrder(False, False)
'First parameter indicates which column to use
'Second parameter indicate the sorting order -- Ascending or Descending
sortOrder.AddColumn(New AuthorsAccess().au_lnameColumn, _
IronSpeed.Base.Data.SqlBuilderSortDirection.OrderDir.Desc)
'Note: You could add more than one columns as shown in the following comment

z Page 647

'sortOrder.AddColumn(New AuthorsAccess().cityColumn, IronSpeed.Base.Data.SqlBuilderSortDirection.OrderDir.Asc)


'This call raises QueryChanged event
dr.SetSortBy(sortOrder)
End Sub
End Class

Step 3: Build and run the application.

Customizing the Sort Order of Table Components


This example demonstrates how to customize the sort order of the items/records/rows in a Table component.
Specifically, this example demonstrates how to customize the order of the items displayed in the
SearchAndPaginationWithNumbers page of the Tutorial application so they are displayed by descending Unit Price
then ascending Product Name. If this example were used in a page that contained Sort controls that allow the user to
change the sort order, the sort controls would only override the Unit Price sorting, the Product Name sorting is part of
the always sort by so it is always used as the tie-breaker for any other sorting. The example uses very simple sorting
logic, but you can modify the sample code to implement your own sorting logic.
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:
'This Handler modifies the V_Product control's DataReader after it is created
Private Sub V_Product_DataReaderCreated(ByVal source As Object, ByVal args As System.EventArgs) _
Handles V_Product.DataReaderCreated
Dim dr As IronSpeed.Base.Data.DataReader = Me.V_Product.GetDataReader()
'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

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

'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

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

Step 3: Build and run the application.

Audit Trails and Use Tracking


In this section:

Adding an Audit Trail

Adding an Audit Trail


An audit trail tracks who did what to which record in your database. Using an audit trail, you can record who created a
record and when it was created, who last modified it and when, and so forth. Audit trails are useful in applications
where it is important to track who has modified the data, such as in customer service and order entry applications
where money and flow-of-merchandise is important.
The value of an audit trail also becomes apparent when you must debug how certain data got into your database.
Having the basic trace information of who created it and when allows you to investigate the circumstances in which the
data was added or modified.
Solution Approach
This example describes how to implement an audit trail by creating and modifying user and date fields in a database
record. The approach taken is to modify the records "safe" class by overriding the SetValue() method which is

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

Step 3: Build and run the application.

z Page 651

SECURITY AND AUTHENTICATION CODING EXAMPLES


This section contains examples for:

Customizing Sign In and Sign Out Page Appearance

Customizing Page Security Enforcement

Customizing Application Authentication Behavior

Implementing Integrated Windows Authentication (Single Sign In)

Customizing Sign In and Sign Out Page Appearance


All applications are created with a "SignIn_Control" panel which is pre-customized to perform application user sign in.
This panel is used in standard Sign In pages created via the Application Builder in Iron Speed Designer. To customize
the appearance of the applications Sign In or Sign Out page, edit the page's layout page file and / or the panel's layout
page file, typically found in:
\<APP NAME>\Source\OtherComponents\SignIn_Control.html
These layout pages are edited just as you would any other layout page.

Customizing Page Security Enforcement


This example illustrates how to customize the way a page enforces security requirements. An example of this is
implementing a non-role-based access requirement.
Option 1 Override the pages EnforceAccessRequirements method
Override the page's EnforceAccessRequirements method, for example:
Protected Overrides Sub EnforceAccessRequirements(ByVal loginRequired As String)
Select Case (Now.DayOfWeek)
Case DayOfWeek.Monday
Me.RedirectToForbiddenPage() 'No access allowed on Mondays
Case DayOfWeek.Friday
Return 'No restrictions on Fridays
Case Else
MyBase.EnforceAccessRequirements(loginRequired)
End Select
End Sub

z Page 652

Option 2 Add an event handler for the pages events


If your custom enforcement code must interact with the page's controls (e.g. RecordControls) after they have had their
data loaded from the database, then Option 1, overriding the EnforceAccessRequirements method, will not work
because it occurs before the user interface controls are databound. In this case, you can add an event handler for one
of the page's events (e.g. DataBinding, Load, or PreRender) which can conditionally redirect to the Forbidden page,
Sign In page, etc.

Customizing Application Authentication Behavior


All pages and panels generated by Iron Speed Designer have a SystemUtils property for accessing the page's
IronSpeed.Base.Utils.SystemUtils object. This object is used by pages, panels, and controls as the main point of
access for role based security operations. (The IronSpeed.Base.Data.DataAccessSettings class is also used for this,
but it is initialized from the SystemUtils object's data). The security-related methods of the SystemUtils object are
implemented to use regular database table(s) to authenticate users and determine user roles(s).
This example shows how to customize your application to use a different authentication mechanism.
Step 1: Modify the IronSpeed.Base.Utils.SystemUtils class in
<IRON SPEED DESIGNER>\IronSpeedBase\Utils\SystemUtils.vb
In particular, you may need to modify the implementation of the following methods:
Public Function SetLoginInfo(ByVal userName As String, ByVal userPassword As String) As Boolean
Private Function GetUserLoginId() As String
Public Function GetUserInfo(ByVal userName As String, ByVal userPassword As String) As IUserIdentityRecord
Public Function IsUserHasAllowedRole(ByVal requiredRoles As String, ByVal userRoles As String) As Boolean

Step 2: Recompile BaseClasses.DLL using the modified BaseClasses source code.


Step 3: Copy the new BaseClasses.DLL (and BaseClasses.PDB if present) into your applications Bin directory. Your
application now has customized authentication.

Implementing Integrated Windows Authentication (Single Sign In)


This example demonstrates how to enable Integrated Windows Authentication so that your application can only be
accessed by Windows Domain Users. It will also show how to restrict page access to users that belong to specific
Windows Domain Groups.
Integrated Windows Authentication can be used instead of the database-table-based security mechanisms provided by
Iron Speed Designer. Using Integrated Windows Authentication, users are transparently authenticated using their
domain credentials. There are no Sign In or Sign Out pages necessary.

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.

Save the changes.


Step 2: Make sure your application is configured to allow Windows Authentication. By default, applications built with
Iron Speed Designer already allow this. This is configured in your applications Web.config file as follows:
<system.web>
<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"
-->
<authentication mode="Windows" />
</system.web>

Step 3: Locate and open the pages safe class, e.g.:

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

Step 5: Build and run the application.

Storing Extra Information at Sign-In Time


This example demonstrates store extra information at sign-in time. There are several reasons to do this, including:

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

Step 3: Build and run the application.

z Page 658

THIRD-PARTY INTEGRATION CODING EXAMPLES


This section contains examples for:

Generating Crystal Reports Documents

Using Microsofts Calendar Control to Pick Dates

Using External DLLs in Applications

Sending Email from an Application

Making Your Application a Web Service

Calling an External Web Service from a Data Access Class

Generating Crystal Reports Documents


This example demonstrates how to integrate Crystal Reports with an Iron Speed Designer-application. It shows how
to add a button to a page generated by Iron Speed Designer that populates an existing Crystal Reports document (.rpt
file) and displays it in Adobes Portable Document Format (PDF). This involves:

Customizing a layout page file by adding a custom button.

Binding the new button to a custom event.

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

Layout Page File

ShowProductsTable.html

Properties File

ShowProductsTable.xml

Crystal Reports File

ProductsList.rpt

Code Generation Tags Used

GEN:Button

z Page 659

Generated Pages
The modified
ShowProductsTable page with
the new Export to PDF button.

The Northwind Products report as rendered in the browser by Acrobat Reader.

Layout Page File


This is a portion of a layout page file that was created by Iron Speed Designers Application Builder, and then edited by
hand to add a new Export To PDF button.
<table cellspacing="0" cellpadding="0" border="0" class="master_table">
<tr>
<td class="button_bar">

z Page 660

<table cellpadding="0" cellspacing="0" border="0" class="holder_table">


<tr>
<td class="button_bar_cell">
<GEN:BUTTON FILE="../OtherComponents/Button-Everest.html" NAME="NewButtonBar" />
</td>
<td class="button_bar_cell">
<GEN:BUTTON FILE="../OtherComponents/Button-Everest.html" NAME="EditButtonBar" />
</td>
<td class="button_bar_cell">
<GEN:BUTTON FILE="../OtherComponents/Button-Everest.html" NAME="DeleteButtonBar" />
</td>
<td class="button_bar_cell">
<GEN:BUTTON FILE="../OtherComponents/Button-Everest.html" NAME="ExportButtonBar" />
</td>
<!-- New "Export to PDF" Button -->
<td class="button_bar_cell">
<GEN:BUTTON FILE="../OtherComponents/Button-Everest.html" NAME="ExportToPDF" />
</td>
</tr>
</table>
</td>
</tr>
</table>

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

Code generation tag

ExportToPDF

Button Text

Export to PDF

Validate page data

No

Action

Custom

Custom action

DisplayAsPDF

Send notification event to

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

Dim crReportDocument As New ProductsList()


DisplayReportAsPDF(crReportDocument)
Else
' not the custom "DisplayAsPDF" command, pass it on
MyBase.OnIronSpeedEvent(args)
End If
End Sub
'
' This function creates an instance of the Crystal Report, in PDF format, and displays it
'
Sub DisplayReportAsPDF(ByVal reportObject As CrystalDecisions.CrystalReports.Engine.ReportClass)
' Declare the necessary Crystal Reports objects
Dim dbTable As CrystalDecisions.CrystalReports.Engine.Table
Dim dbLogin As CrystalDecisions.Shared.TableLogOnInfo
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
' Create a temporary file to hold the report
' -- use the session ID in the filename to avoid process conflicts
' -- use a built-in Iron Speed utility function (and the "MapPath" method) to get the current
' -- application's root path
Dim fname As String =
Server.MapPath(IronSpeed.Base.Configuration.ApplicationSettings.Current.AppRootPath) _
& "\" & Session.SessionID.ToString & ".pdf"
' define the Crystal Report ouput options
crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = fname
crExportOptions = reportObject.ExportOptions
With crExportOptions
DestinationOptions = crDiskFileDestinationOptions
ExportDestinationType = ExportDestinationType.DiskFile
ExportFormatType = ExportFormatType.PortableDocFormat
End With
' Retrieve DB Connection Info
Dim ProductsTable As New CrystalReportsDemo.ProductsAccess()
Dim DBConnectionName As String = ProductsTable.ConnectionName
Dim DBConnString As String = _
IronSpeed.Base.Configuration.ApplicationSettings.Current.GetConnectionString(DBConnectionName, False)
Dim DBConnection As IronSpeed.Base.Configuration.DatabaseConnection
DBConnection = IronSpeed.Base.Configuration.DatabaseConnection.Parse(DBConnectionName, DBConnString)
' get the connection's user id and password values

z Page 663

Dim uid As String = DBConnection.UserName


Dim pw As String = DBConnection.Password
' set the login for all the tables in the report
For Each dbTable In reportObject.Database.Tables
dbLogin = dbTable.LogOnInfo
dbLogin.ConnectionInfo.Password = pw
dbLogin.ConnectionInfo.UserID = uid
dbTable.ApplyLogOnInfo(dbLogin)
Next
' export the document to the temporary file
reportObject.Export()
' Create the HTTP Response as PDF and output the file
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(fname)
Response.Flush()
' Clean up the Response object and delete the temporary file
Response.Close()
System.IO.File.Delete(fname)
End Sub

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

Step 8: Build and run the application.


Step 9: In the newly-customized application, navigate to the Products page, and click the new Export to PDF button.
A PDF report showing Northwind Products data will be displayed in your web browser.
Note: The customizations described above are safe, and will be retained even if you make other changes within Iron
Speed Designer and build the application. However, be sure to set the Compiler Option to Visual Studio (rather than
Visual Basic) to ensure that references to the Crystal Reports modules are properly resolved during compilation.
Creating unembedded reports
The process for creating unembedded reports requires only a very minor modification to the application.
Step 1: In Visual Studio, open the CrystalReportsDemo VBPROJ file (the current example application uses Visual
Studio 2002). Right-click ProductsList.rpt (the Crystal Reports report file), select "Properties", and change
"BuildAction" from "EmbeddedResource" to "None". This keeps Visual Studio from "embedding" the report file into the
VBPROJ file as a resource.

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)

Step 3: Build and run the application.


Note that the above "Load" command assumes the report file to be loaded from the generated Products folder. Your
reports might reside elsewhere.
Additional details are explained on the Crystal Decisions website in a PDF document at
http://support.businessobjects.com/communityCS/TechnicalPapers/crnet_deployment.pdf.

Using Microsofts Calendar Control to Pick Dates


This example shows how to use a third-party control to edit a date field value. The third-party control used in this
example is the Microsofts ASP.NET Calendar control.
Editing the field value will require the presence of another editable field value to use as an entry point for populating
the Calendar control and for saving the data selected in the Calendar control. More precisely, we add a Calendar
control to the Hire Date, and use the Birth Date as an entry point. The overall strategy is to get and set values of a
3rd-party control by "piggy backing" on the LoadedData and SavingData functions of the control.
An alternative to replacing the GEN:FieldValue tag with asp:calendar is to leave the GEN:FieldValue tag in place and
add the asp:calendar as another control. This makes the generated FieldValue control invisible, but it uses its own
LoadedData and SavingData functions to set values in the calendar. This uses the HireDate FieldValue control to get
and set the HireDate in the calendar control. However, this alternative approach is more restrictive because the page
must contain a FieldValue tag for the specific field. The example below only requires a FieldValue for ANY field (which
could be the same field).

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>

with a code generation tag for the third-party Calendar control:


<td class="dialog_field_value">
<asp:Calendar id="Calendar1" runat="server"></asp:Calendar>
</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:

Protected WithEvents Calendar1 As System.Web.UI.WebControls.Calendar

Private Sub V_BirthDateFieldValue_LoadedData

Private Sub V_BirthDateFieldValue_SavingData

' 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 EditEmployeesRecord
Inherits EditEmployeesRecordGen
Protected WithEvents Calendar1 As System.Web.UI.WebControls.Calendar

z Page 667

' To use a third-party Calendar control to edit the Hire Date,


' piggy-back off of another field value, e.g. the Birth Date.
' We will load the hire date after the birth date is loaded.
Private Sub V_BirthDateFieldValue_LoadedData(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles V_BirthDateFieldValue.LoadedData
' table access
Dim employeeAccess As EmployeesAccess = EmployeesRecord.TableUtils
' get the hire date value
Dim hireDateValue As IronSpeed.Base.Data.ColumnValue =
v_record.GetFieldValue(employeeAccess.HireDateColumn.Name, Nothing)
' cast to to a date time
Dim hireDate As Date = hireDateValue.ToDateTime()
' pre-populate the Calendar third-party control
Calendar1.SelectedDate = hireDate
Calendar1.VisibleDate = hireDate
End Sub
' To use a third-party Calendar control to edit the Hire Date,
' piggy-back off of another field value, e.g. the Birth Date.
' We will save the hire date when we save the birth date.
Private Sub V_BirthDateFieldValue_SavingData(ByVal sender As Object, ByVal e As _
System.ComponentModel.CancelEventArgs) Handles V_BirthDateFieldValue.SavingData
' table access
Dim employeeAccess As EmployeesAccess = EmployeesRecord.TableUtils
' get hire date from third-party Calendar control
Dim hireDate As Date = Calendar1.SelectedDate
' save the hire date to database
v_record.SetFieldValueString(employeeAccess.HireDateColumn.Name, hireDate.ToString, Nothing)
End Sub
End Class
Namespace PanelControls.EditEmployeesRecord
'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

z Page 668

'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(_u121 ?Val 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
'instances instantiated/used by this page/panel.
Public Class CustomRecordControl
Inherits IronSpeed.Base.Web.UI.WebControls.RecordControl
'Protected Overrides Function ValidateData(ByVal v As _
IronSpeed.Base.Web.UI.WebControls.RecordControlCustomValidator) As Boolean
'End Function
'Protected Overrides Sub InitializeFieldControl(ByVal fvc As IronSpeed.Base.IFieldValueComponent)
'End Sub
End Class
End Namespace

Step 6: Build and run the application.

Using External DLLs in Applications


This example shows how to use third-party (or external) DLL's in applications and compile them using VBC.exe, the
default VB.NET compiler used by Iron Speed Designer. (The other compiler that Iron Speed Designer can use is
Visual Studio .NET).
Step 1: Modify CompileApplication.rsp to use third-party DLL's. When Iron Speed Designer uses vbc.exe to compile
the application, it uses
\<Application Folder>\CompileApplication.rsp

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.

Step 3: Build and run the application.

Sending Email from an Application


This example shows how to send an email notification from within an application. The easiest way to handle this is in
the OnIronSpeedEvent function. Override this function, call the MyBase version, and then do your emailing.
Procedure
Step 1: Override the OnIronSpeedEvent function.
'Initiates the login when a LOGIN event is consumed
Public Sub OnIronSpeedEvent(ByVal args As IronSpeed.Base.IronSpeedEventArgs)
' Call the base function to handle all events.
MyBase.OnIronSpeedEvent(args)
If (args.EventType = IronSpeed.Base.IronSpeedEventArgs.EventTypes.UpdateData) Then
' Do the post update handling here.
End If
End Sub

Step 2: Build and run the application.

Making Your Application a Web Service


This example shows how to create a web service that performs adds, gets and deletes records from a database table.
The database table used is the Shippers table in the Microsoft SQL Server Northwind database.

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

' web service function to Delete a Shippers record


' input: shipper id
' output: boolean indicating success/failure to delete record
<WebMethod()> Public Function DeleteShippersRecord(ByVal shipperId As Integer) As Boolean
Dim isSuccessfullyDeleted As Boolean = False
' 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 the Shippers table data access class
Dim shipperAccess As ShippersAccess = ShippersRecord.TableUtils
' Set up primary key for the record to delete
Dim primaryKey As New IronSpeed.Base.Data.KeyValue()
primaryKey.AddElement(shipperAccess.ShipperIDColumn.InternalName, shipperId.ToString())

z Page 672

' Delete the record using the above primary key


shipperAccess.DeleteRecord(primaryKey)
' Commit the transaction
t.Commit()
' Flag a successful delete
isSuccessfullyDeleted = True
Catch e As Exception
'Rollback the transaction
t.Rollback()
Finally
'Release the transaction
IronSpeed.Base.Data.SqlProvider.SqlTransaction.ReturnTransactionObject(t, True)
End Try
Return isSuccessfullyDeleted
End Function
' web service function to Get a Shippers record
' input: shipper id
' output: a MyShipperRecord object containing the data from the record
<WebMethod()> Public Function GetShippersRecord(ByVal shipperId As Integer) As MyShipperRecord
Dim myShipperRecord As MyShipperRecord
' 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 the Shippers table data access class
Dim shipperAccess As ShippersAccess = ShippersRecord.TableUtils
' Set up primary key for the record to get
Dim primaryKey As New IronSpeed.Base.Data.KeyValue()
primaryKey.AddElement(shipperAccess.ShipperIDColumn.InternalName, shipperId.ToString())
' Get the record from database
Dim shipperRecord As ShippersRecord = shipperAccess.GetRecord(primaryKey, False)
' Set up the MyShipperRecord object for return
myShipperRecord = New MyShipperRecord()
myShipperRecord.shipperId = shipperId
myShipperRecord.companyName = shipperRecord.GetCompanyNameFieldValue()

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

Step 7: Compile the application in Visual Studio .NET.


Step 8: The web service now has three supported operations:
1. DeleteShippersRecord
2. GetShippersRecord
3. AddShippersRecord
It can be accessed via http://localhost/<App Name>/<Folder>/<Web Service Name>, e.g.:
http://localhost/AppWithWebService/MyWebServiceDirectory/ShippersTableWebServices.asmx

Calling an External Web Service from a Data Access Class


This example shows how to use a web service to fetch, update, and delete data from a web service-based data
source. This provides an alternate way to access data than the database stored procedure and inline SQL access
normally generated by Iron Speed Designer.
This particular example uses the web service described in the example Making Your Application a Web Service. This
example assumes the web service being called is not in the same application as the current application, making this a
realistic example of using a web service for intranet or extranet application integration.
The Microsoft SQL Server Northwind databases Shippers table is used, and it assumes you are using Shippers table
in your application.
Procedure
Step 1: Open the generated applications VBPROJ file in Visual Studio.NET.

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

' set up output values (identity field returned by database)


columnvalues(getcolumnindexbyname(tableDataAccess.ShipperIDColumn.InternalName)) = shipperId
Me.IsWritable = True
Me.IsValid = True
Me.IsDirty = False
Me.ParticipateInTransaction = True
' return primary key of create record
Return Me.GetID()
Catch e As Exception
Throw e
End Try
End Function

Step 5: Compile the application in Visual Studio .NET.


Step 6: Use the Add Record, Edit Record, and Show Record pages, and the Delete Record function. The record
operations in the application now call the web services functions.

z Page 677

PART VIII: REFERENCE

PART VIII: REFERENCE .................................................................................................. 1


Table and Properties Files ..................................................................................................................... 3
Properties Files .....................................................................................................................................................4

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

nDoc and VBDoc License Agreement ................................................................................................ 53

z Page 679

TABLE AND PROPERTIES FILES


One way of viewing the application generation process is from the perspective of the information that is collected and
utilized by Iron Speed Designer to generate your application. Specifically:
Iron Speed Designer maintains information about the database tables, views, and queries to which the generated
databound controls are bound. These table schemas, foreign key relationships, and other parameters are maintained
in table binding files created by Iron Speed Designer.
The Properties dialog in Iron Speed Designer binds the individual databound controls to the underlying database
tables and fields by identifying the specific databases, tables, and fields that are to be connected to each individual
component. Iron Speed Designer maintains this information in properties files.
The application development process in
Iron Speed Designer uses and generates
several important files, including:

Layout page files

Table binding files

Properties files

The databound controls, represented by


code generation tags in the layout pages,
are bound to the underlying database
tables using the Properties dialog. The
application is generated using the layout
pages, table definitions, and component
properties.

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>

This portion of a properties file


contains information for a
FieldValue component.

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:

Copying Properties Files

Self Element

Handling Errors in Properties Files

ComposedOf Element

Basic XML Syntax and Vocabulary

EventBindings Element

Prologue

Event Element

ComponentDefinition Element

ContainedComponent Element

Copying Properties Files


The properties file and the layout page files are a pair of files that are linked to one another closely. The properties file
is heavily dependent on the layout page file since the code generation tag properties are set within the layout page
file. Moreover, the name of the layout page file is embedded into the properties file.

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.

Handling Errors in Properties Files


When you change the code generation tags in the HTML layout page file either their name or type of tag Iron
Speed Designer tries its best to match the new tag name or type with the old component properties. However, it may
not be able to always preserve all of the information. Changes such as these can result in any of the following errors:

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.

There are a number of ways to correct these errors:

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

Basic XML Syntax and Vocabulary


Properties files are XML documents. XML tags identify the data and can be in any order. XML tags can also be
nested or hierarchical. The nested tags are called Elements or Sub-Elements. For example, an email message
might be transmitted in XML as follows:
<Message>
<To>[email protected]</To>
<From>[email protected]</From>
<Subject>Great product!</Subject>
<ReturnReply>True</ReturnReply>
<Text>
Did you know that Iron Speed Designer is a great product to create web applications quickly!
</Text>
</Message>
In the above example, the Message tag is used to describe the email message and it in turn contains nested tags,
such as To, From, Subject and Text. The nested tags are unique within the tag they are nested in. For example, the
Subject tag may also be nested in another tag, such as a Book tag, perhaps with a different semantic meaning, and
will not conflict with the Subject tag within the Message tag.
All XML tags must end with a closing tag, such as </Message>. Alternatively an XML tag may also be specified as:
<Subject />
to specify an empty subject. It is also better to specify an empty tag to indicate that there is no data for that tag.
Empty tags can be specified in one of two formats:
<Subject/>
<Subject></Subject>
XML tags may also contain attributes. For example,
<Message Type=text>
contains an attribute called Type whose value is text.
Elements that contain other elements, such as message above, are called Complex Elements while elements that
are leaf nodes and do not contain other elements, such as subject above, are called Simple Elements.
For more information about XML, please refer to the many books and websites that are available and describe XML in
considerable detail.

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:

XML Declaration Element

XML Declaration Element


The XML declaration is a processing instruction that identifies the document as being XML. All XML documents should
begin with an XML declaration.
The XML declaration is of the following format:
<?xml
version="version_number"
encoding="encoding_declaration"
standalone="standalone_status" ?>

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 XML declaration has no closing tag, that is </?xml>.

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>

contains details of Self complex element.

contains zero or more ContainedComponent complex elements

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

Indicates that Iron Speed Designer created this file.


Iron Speed Designer

Version

Simple

Iron Speed Designer created this file.

Indicates which version of Iron Speed Designer created the file.


1.2

Iron Speed Designer V1.2

1.3

Iron Speed Designer V1.3

1.4

Iron Speed Designer V1.4

Version 1.4 files are not compatible with earlier versions of the properties
files.

z Page 688

Element

Type

Description

Self

Complex

This is described in its own section later in this document.

ComposedOf

Complex

This is described in its own section later in this document.

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

The event bindings specify the bindings between a producer and a


consumer of events. This complex element is described in its own section
later in the document.

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

Defines the relationship between producers and consumers.

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>

one or more ContainedComponents

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

Specifies the type of the component as shown below. Each of these


types is defined in detail later in this Guide.
Any
Button
CategoryFilter
DateFilter
FieldFilter
FieldLabel
FieldSort
FieldStatistic
FieldValue
Footer
Header

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

Used when the FieldValue is a DropDownList or a RadioButtonList to


indicate whether the contents of those lists are automatically generated
based on the data type or from the database.
The possible values are true or false.

ControlName

Simple

This element is used by any component that needs to link to components


together. For example, the Next Page component needs to know the
button corresponding to the Next Page control. This element specifies the
related control.
The valid value for this element is the name of any code generation tag
specified in the HTML layout page file.

Description

Simple

DisplayStyle

Simple

Editable

Simple

A text description of the component. The application generation engine


does not use the value of this element.

Indicates whether a FieldValue component is editable or not.


The possible values are true or false.

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

This element is specified for FieldValue components and specifies the


display style used for the field value. The valid values are:
CheckBox
DropDownList
Hyperlink
Label
RadioButton

FieldStatisticType

Simple

RadioButtonList
TextBox
Literal
Image
FileUpload

ImageButton
LinkButton
PushButton
ListBox

This element is used to specify the type of a FieldStatistic code generation


tag.
Currently, the only permitted value is sum.

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

The URL of the image if this component is an Image component.

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

This element specifies the maximum number of items to display in a


dropdown list.

NullValueText

Simple

The value to display when a NULL value is read from the database for the
given field. This is typically defaulted to &nbsp; to indicate a hard space.

PaginationType

Simple

Specifies the type of pagination control to display. The pagination type


could be one of the following values:
CurrentPage
FirstItem
FirstPage
LastItem
LastPage
NextPage
PageSize
PreviousPage
TotalItems
TotalPages

z Page 695

Element

Type

Description

PassthroughAttributes

Complex

This complex element is used for three purposes:


1. Internal Use: A number of parameters are needed by the application
generation engine to generate the correct code. Any pass through
attribute whose name has an InternalUse: prefix is used by the
application generation engine.
2. Pass through values: Any attribute-value pairs that need to be passed
through to the generated control are specified here.
3. Extensibility: Since you can specify any attribute-value pair, this
element allows you to extend the generated controls easily by
specifying attributes and their values on the Properties tab of the
Properties dialog.

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

If the Record Source is URL, this specifies the Key to use as he


QueryString parameter on the URL.

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

Specifies the name of the button. Can be any text value.

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

All > Manufacturer: Sony


Pass-through attributes
Pass-through attributes

Description

Fields

A comma separated list of fields to be used by the


Category Filter.

InternalUse:Table

The name of the table containing the Field specified


earlier.

V_CategoryFilterPathContainer:CssClass

A cascading style sheet class name to be used for the


path portion of the category filter.

V_CategoryFilterSubcategoryContainer:CssClass

A cascading style sheet class name to be used for the


sub-category portion of the category filter.

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

The style of the field filter to display. Valid values


are TextBox and DropDownList. This is described
in more detail earlier in this document.

InternalUse:Table

The name of the table that the field being filtered


belongs to.

Operator

Any of the comparison operations such as =, !=, <,


<=, >, >=, etc.

V_ContactNameFieldFilterDropDownList:CssClass

The CssClass of the dropdown list box.

CssClass

The CssClass of the text box.

V_OrderDateFilterEndTextBox:Columns

The width of the text box if the style indicates the


field filter is a text box.

A sample field filter component with a dropdown.


<ContainedComponent>
<Name>ContactNameFieldFilter</Name>
<Type>FieldFilter</Type>
<FieldValueStyle>DropDownList</FieldValueStyle>
<PassthroughAttributes>
<Attribute>
<Name>Field</Name>
<Value>ContactName</Value>
</Attribute>
<Attribute>
<Name>InternalUse:Table</Name>
<Value>Suppliers</Value>
</Attribute>
<Attribute>
<Name>Operator</Name>
<Value>=</Value>

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>&gt;=</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

The name of the table containing the field.

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&amp;Field=Photo&amp;Record={0}&amp;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>&lt;img src="{0}" width="50"&gt;</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>&lt;p&gt;this is html&lt;/p&gt;</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

The URL to go to when the hyperlink is clicked.

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

The text label to use for the button.

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

The text label to use for the button.

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

A Boolean value indicating whether a case sensitive or insensitive search should be


performed.

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

The width of the textbox to use to display the search area.

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

The number of rows to display per page.

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

Specifies the source of the data. This either TableOrQuery or Parent.

StatType

Indicates the type of statistic to display. If specified as Count, this component


displays the total number of records in the table, view or query.

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

The text to display on the layout page.

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

NDOC AND VBDOC LICENSE AGREEMENT


nDoc and VBDoc components distributed under the GNU General Public License, Version 2, June 1991.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU
General Public License is intended to guarantee your freedom to share and change free software--to make sure the
software is free for all its users. This General Public License applies to most of the Free Software Foundation's
software and to any other program whose authors commit to using it. (Some other Free Software Foundation software
is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed
to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish),
that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new
free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to
surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the
software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all
the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show
them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no
warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to
know that what they have is not the original, so that any problems introduced by others will not reflect on the original
authors' reputations.

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

%ISD_DEFAULT% .................................. 138, 497, 702


**Please Select**...................................................... 610

.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

Active Directory and LDAP.......................................396


Add Record and Edit Record Pages ........................105
Add Record button action.........................................210
Add Record button command...................................243
Add Record Page .....................................................531
Add record pages
Automatically creating .........................................106
Page templates ...................................................284
Pre-defined page type...........................................29
Adding a Custom Named Query ................................74
Adding a Layout Page via the File System ..............127
Adding a New Record to a Database Table.............228
Adding a Reusable Panel to a Page ........................460
Adding an Audit Trail ................................................649
Adding and Modifying Page Templates....................491
Adding Custom Data Validation Code......................592
Adding Multiple Menus to a Page.............................583
Adding Multiple Records at One time.......................613
Adding New Records................................................619
Adding Not-Null Field Constraints ..............................73
Adding Third-Party Controls and Components ........475
Adding Virtual Foreign Key Relationships ..................64
Adding Virtual Primary Key Relationships..................63
Adding Your Application to the Windows Registry ...419
AddOneRecord Template type.................................492
AddRecord events ....................................................254
Adjusting Security Settings in Machine.config .........444
Administering Your Application ..................................93
Administrative tools
Internet Information Services (IIS) ......................436
ADO DataSet class...................................................389
Advanced Filter Criteria (Multi-Table Joins) .............232
Advanced Page Features.........................................580
Align code generation tag.........................................493
Align tag
Description of ......................................................195
All Lowercase .............................................................67
All Uppercase .............................................................67
Alternating rows................................................547, 549
AlternatingItemTemplate tag
Description of ......................................................161
Always sort by ..........................................................250
AppInfo.xml file .........................................................279
Application
Administration........................................................93
Building................................................................414
Building and running .......................................48, 49
Building options .............................................49, 107
Compilation .........................................................267
Culture...................................................................32
Customization and modification ..........................263

z Page 735

Directory location .................................................. 32


DLL file ................................................................ 272
Formatting ............................................................. 32
Generating ...................................................... 18, 48
Generation .......................................................... 414
Messages.............................................................. 32
Name..................................................................... 31
Name space ........................................................ 422
Namespace ........................................................... 32
Performance........................................................ 400
RESX file............................................................. 280
Running................................................................. 50
Sign-in ................................................................... 88
Signing in .............................................................. 92
uiCulture................................................................ 32
Application Builder ................................................... 114
Build your application............................................ 46
Configuring column totals ..................................... 43
Configuring master-detail pages ........................... 43
Configuring options ............................................. 105
Configuring page fields ......................................... 41
Configuring page filtering ...................................... 42
Configuring web pages ......................................... 39
Connecting to database servers ........................... 33
Creating navigation menus ................................... 45
Creating new applications..................................... 30
Creating web pages .............................................. 28
Creating your first application ............................... 26
Pre-defined page templates.................................. 28
Selecting a start page ........................................... 45
Selecting a web page style ................................... 32
Selecting database tables..................................... 35
Application Builder Tab .............................................. 22
Application Building Options .............................. 49, 107
Application Compilation and Configuration Tools .... 267
Application deployment ............................................ 417
Copying applications to a production server....... 417
Copying stored procedures to a production server
......................................................................... 418
Creating virtual directories .................................. 418
Database connection settings............................. 419
Windows Registry ............................................... 419
Application development process ............................ 112
Application Development Process with Iron Speed
Designer ............................................................... 112
Application Explorer tab ............................................. 24
Application Folder Organization ............................... 269
Application layer ................................................. 20, 266
Base classes ....................................................... 316
Application Logic Errors ........................................... 391
Application Security Management ........................... 392

Application Wont Run ..............................................435


Applications
Creating a new application....................................26
Load balancing ....................................................399
Personal firewall blocking....................................436
Wont run .............................................................435
Application-Wide Middle-Tier Filtering......................635
appSettings Element ................................................402
Architecture
Application layer ..................................................266
Database layer ....................................................267
Generated applications .......................................265
Presentation layer ...............................................266
Architecture of Generated Applications....................265
ASCX controls ............................................................48
Best uses of.........................................................264
ASP.NET ..................................................................437
Directives in page template files .........................506
Session state service ..................................420, 440
Setup ...................................................................444
State service................................................446, 448
ASP.NET State service ............................................409
ASPX controls
Files.....................................................................276
ASPX pages
Best uses of.........................................................264
Files.....................................................................276
Generating.............................................................48
AssemblyInfo.vb file..........................................271, 285
Attribute pass-through ..............................................238
Audit trails.................................................................649
Authentication
Windows..............................................................431
Authentication
Microsoft SQL Server user name and password ..35
Multiple role ...........................................................82
Simple sign-in........................................................80
Single role .............................................................81
Windows authentication ........................................35
Automatic sign-out....................................................408
Automatic Sign-Out ..................................................396
AutoRedirectPostBack method ................................330
Back button handling ................................................313
Back button redirect URL .........................214, 245, 313
Base class
Bin folder .............................................................286
Column classes folder.........................................287
Configuration folder .............................................286
Data model class folder.......................................287
Data reader class folder ......................................287
Object file folder ..................................................287

z Page 736

SQL provider folder............................................. 287


Utilities folder....................................................... 287
Web folder........................................................... 288
Base class folder...................................................... 285
Base classes ............................................ 267, 316, 327
<COMPONENT>Access class............................ 326
<COMPONENT>AccessGen class..................... 326
<COMPONENT>Record class............................ 324
<COMPONENT>RecordGen class..................... 324
<PAGE> generated classes................................ 317
<PAGE> safe classes ......................................... 318
<TABLE>Access class........................................ 323
<TABLE>AccessGen class................................. 322
<TABLE>Record class........................................ 321
<TABLE>RecordGen class................................. 320
BaseFilterControl class ....................................... 365
BaseIronSpeedValidator class............................ 348
BasePage class .................................................. 328
BaseRecord class ............................................... 335
Boolean class...................................................... 349
CategoryFilterControl class................................. 365
CompareValidator class...................................... 350
CountryValidator class ........................................ 351
CreditCardDateValidator class............................ 351
CreditCardNumberValidator class ...................... 352
CurrencyValidator class ...................................... 352
Custom control tag prefix .................................... 290
CustomValidator class ........................................ 353
Database classes................................................ 334
DateFieldValueFilterControl class ...................... 366
DateTimeValidator class ..................................... 354
DLL file ................................................ 272, 286, 422
EmailValidator class............................................ 354
Field classes ....................................................... 344
FieldSortControl class......................................... 367
FieldValue class.................................................. 354
FieldValueFilterControl class .............................. 367
FileValidator class............................................... 355
Filter classes ....................................................... 363
ImageValidator class........................................... 355
IronSpeedBase folder ......................................... 285
IronSpeedBase\Bin folder ................................... 286
NumberValidator class........................................ 356
Page class........................................................... 328
Page classes....................................................... 317
PagingControl class ............................................ 369
PasswordValidator class..................................... 356
PercentValidator class ........................................ 357
PhysicalRecord class.......................................... 336
PhysicalTableAccess class......................... 340, 341
ProjectTemplate folder........................................ 288

RangeValidator class ..........................................357


Record class........................................................334
Record classes....................................................319
RecordControlCustomValidator class .................358
RegularExpressionValidator class ......................359
RequiredFieldValidator class ..............................360
RESX file .............................................................273
SearchTextControl class .....................................370
ShortDateValidator class.....................................361
Table access classes ..........................................321
TableAccess class...............................................340
URL Validator class.............................................361
UsaPhoneNumberValidator class .......................362
UsaStateValidator class ......................................362
UsaZipCodeValidator class.................................362
User interface control classes .............................334
Validator class .....................................................345
Virtual record class..............................................323
Virtual table access classes ................................325
VirtualRecord class .............................................338
VirtualTableAccess class ....................................343
BaseClasses
BasePageSettings presentation control tag........297
Button presentation control tag ...........................296
CategoryFilterControl presentation control tag ...297
CompareValidator presentation control tag ........298
CustomValidator presentation control tag...........299
DatefieldValueFilterControl presentation control tag
.........................................................................299
DropDownList presentation control tag ...............300
FieldNameLabel presentation control tag ...........301
FieldSortControl presentation control tag ...........302
FieldValueTextBox presentation control tag .......301
FieldValueValidator presentation control tag ......301
HyperLink presentation control tag .....................302
Image presentation control tag............................303
ImageButton presentation control tag .................303
Label presentation control tag.............................304
LinkButton presentation control tag.....................304
MenuLink presentation control tag ......................305
NumberValidator presentation control tag ..........305
PagingControl presentation control tag...............307
Panel presentation control tag ............................307
PasswordValidator presentation control tag .......306
PlaceHolder presentation control tag ..................308
RadioButton presentation control tag..................308
RecordControlCustomValidator presentation control
tag....................................................................309
RecordControlImageButton presentation control tag
.........................................................................309
RequiredFieldValidator presentation control tag.308

z Page 737

SearchTextControl presentation control tag ....... 310


ShortDateValidator presentation control tag....... 310
TableControlFieldSumLabel presentation control
tag.................................................................... 311
TableControlRadioButton presentation control tag
......................................................................... 310
TableControlRepeater presentation control tag.. 311
TextBox presentation control tag ........................ 311
TextBoxMaxLengthValidator presentation control
tag.................................................................... 312
BaseClasses.dll file .................................. 272, 286, 422
BaseClasses.resx error message file ...... 100, 101, 273
BaseFilterControl class ............................................ 365
BasePage class ....................................................... 328
BasePageSettings presentation control tag............. 297
BaseRecord class .................................................... 335
BasesIronSpeedValidator class ............................... 348
Basic schema information .......................................... 57
Basic XML Syntax and Vocabulary.......................... 685
Bin folder .................................................. 272, 279, 283
Binary Data Type Limitations for Microsoft SQL Server
.............................................................................. 372
Binding an Edit Button in a Show Table Page ......... 257
Binding Components to the Database ..................... 118
Binding files
Property............................................................... 681
Table ................................................................... 680
Binding Producer Consumer Events........................ 255
Boolean field type................................................. 60, 67
BooleanValidator class............................................. 349
Browser
Cookies ............................................................... 371
Browser back button handling.................................. 313
Browser Compatibility .............................................. 293
Btn resource key prefix ............................................ 102
Build All command ..................................................... 50
Build command........................................................... 49
Build options............................................................. 107
Compiler.............................................................. 107
SQL statement .................................................... 108
Visual Studio project file format .......................... 108
Building an Application............................................... 49
Building and Running Your First Application.............. 48
Building Independent Reusable Panels ................... 459
Building Reusable Panels and Components............ 459
Building Your Application ......................................... 414
Built-in functions
LoggedInUserID() ............................................... 235
Button action
Add Record ......................................................... 210
Custom................................................................ 210

Delete Record .....................................................210


Export Data .........................................................210
Log Out................................................................210
Redirect ...............................................................210
Refresh Data .......................................................210
Search .................................................................210
Update Data ........................................................210
Button Action ............................................................210
Button Actions and Properties..................................209
Button controls..................................................177, 178
Button Display Properties.........................................209
Button element .........................................................697
Button panel
Page-level property .............................................133
Panel types..........................................................490
Button Panels ...........................................................461
Button presentation control tag ................................296
Button properties
Action ..................................................................210
Add record...........................................................210
Button tag
Redirect URL.....................................................245
Button text ...........................................................209
Command name..................................................210
Consumers ..................................................212, 244
Custom action .....................................................212
Custom command ...............................................212
Custom function call............................................210
Delete record.......................................................210
Export data ..........................................................210
Go to page...........................................................212
Image file (URL) ..................................................209
Log out ................................................................210
Redirect ...............................................................210
Redirect argument...............................................245
Redirect parameter types....................................215
Redirect parameters............................................214
Redirect URL...............................................214, 313
Refresh data........................................................210
Send event notification to....................................212
Text .....................................................................209
Tool tip.................................................................210
Updata data.........................................................210
Validate page data ..............................................210
Button Properties
Properties ............................................219, 220, 257
Button tag
AddRecord pass-through attribute ......................243
CausesValidation pass-through attribute ............243
CommandArgument pass-through attribute........243
CommandName pass-through attribute ..............243

z Page 738

Consumers pass-through attribute ..................... 244


Custom pass-through attribute............................ 243
deleteonupdate pass-through attribute ............... 243
DeleteRecord pass-through attribute.................. 243
ExportData pass-through attribute...................... 243
FilterData pass-through attribute ........................ 243
GotoPrevious pass-through attribute .................. 243
ImageURL pass-through attribute....................... 245
LogOut pass-through attribute ............................ 243
Pass-through attributes....................................... 243
Properties............................................................ 209
Redirect pass-through attribute........................... 243
RedirectArgument pass-through attribute........... 245
RedirectURL pass-through attribute ................... 245
Reset Data pass-through attribute...................... 243
Search pass-through attribute............................. 243
Text pass-through attribute ................................. 245
ToolTip pass-through attribute ............................ 245
UpdateData pass-through attribute..................... 243
Button Tag Pass-Through Attributes........................ 243
Button Tags .............................................................. 177
Buttons ..................................................................... 461
Calendar control ....................................................... 666
Calling a Custom Function when a Button is Clicked
.............................................................................. 222
Calling an External Web Service from a Data Access
Class..................................................................... 674
Calling Your Own Database Stored Procedures...... 625
Cannot update [tablename]. The data you entered
conflicts................................................................. 438
Capitalize All Words ................................................... 67
Capitalized field formatting......................................... 67
Capturing the Enter Key in Layout Pages................ 313
Cascading style sheets ............................ 281, 282, 505
Case conversion ........................................................ 67
CaseSensitive pass-through attribute ...................... 250
Case-sensitive search...................................... 187, 250
Categorization control ...................................... 106, 180
Categorize .................................................................. 42
CategoryFilter element............................................. 698
CategoryFilter tag
CssClass pass-through attribute......................... 246
Description of ...................................................... 180
Field to categorize............................................... 181
Fields pass-through attribute .............................. 246
Pass-through attributes....................................... 245
Properties............................................................ 180
Selected fields................................................... 181
Table, view or query.......................................... 181
Table pass-through attribute ............................... 246
Table to categorize ............................................. 181

CategoryFilter Tag Pass-Through Attributes............245


CategoryFilterControl class ......................................365
CategoryFilterControl presentation control tag ........297
CausesValidation pass-through attribute .................243
Changing a Dialog Title ............................................580
Changing a Page Title..............................................580
Changing Database Connection Settings ................419
Changing Page Titles ...............................................581
Character Sets............................................................98
Check box display style............................................202
Checkboxes..............................................................515
CheckedValue pass-through attribute ......................247
Classes
Generated ...........................................................267
Page ....................................................................276
Record.........................................................273, 275
Safe .....................................................................267
SQL access .........................................................274
SQL Access definition .........................................275
Table access ...............................................274, 275
Table definition ............................................274, 275
Client-Side JavaScript in Generated Pages.............291
Client-side scripting ..................................................291
Close browser redirect URL .....................................214
Code Generation Tag Attributes...............................125
Code Generation Tag Prefixes.................................124
Code Generation Tag Reserved Names ..................125
Code Generation Tag Syntax...................................123
Code generation tags
Align ............................................................195, 493
AlternatingItemTemplate .....................................161
Attributes .............................................................125
Best uses of.........................................................264
Button tags ..........................................................177
CategoryFilter......................................................180
Component use tags ...........................................189
Definition of .........................................................115
Field display tags.................................................135
FieldFilter.............................................................182
FieldLabel............................................................137
FieldStatistic ........................................................168
FieldValue ...................................125, 126, 127, 135
Filter tags.............................................................180
FooterTemplate ...................................................166
ForEach.......................................................194, 492
Group ..................................................192, 193, 493
HeaderTemplate..................................................165
How they work.....................................................121
HTML...................................................................143
HyperLink ............................................................145
Image ..........................................................119, 146

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

Creating a DataTable Object to use with Third-Party


Controls ...........................................................629
Creating a Large List Selector.............................585
Creating Custom Table Columns ........................623
Customizing application authentication behavior 653
Customizing data validation logic........................593
Customizing Page Security Enforcement ...........652
Customizing Sign In and Sign Out Page
Appearance .....................................................652
Customizing Table Component Filtering .............630
Customizing the default error message ..............592
Customizing the Sort Order of Field Value Items603
Customizing the Sort Order of Table Components
.........................................................................648
Dashboard page..................................................571
Dashboard page with advanced queries.............574
Disabling Concurrency Validation for a Single Page
.........................................................................596
Display a master-detail page...............................562
Display a record ..................................................513
Display a record with fields using checkboxes....515
Display a record with fields using drop down list 520
Display a record with fields using radio buttons..517
Display a record with search for a record ...........565
Display a table of records....................................535
Display a table with a range filter ........................539
Display a table with alternating rows...................547
Display a table with different alternating rows.....549
Display a table with multiple fields within a column
.........................................................................552
Display a table with multiple fields within a sortable
column .............................................................553
Display a table with page and grand totals .........544
Display a table with search .................................537
Display a table with sortable column headings ...541
Display a table within a table...............................555
Display images based on URLs from a database
.........................................................................524
Display images from a database.........................522
Display record with search and pagination .........567
Edit record page ..................................................528
Filtering a show table page using a field not in the
table .................................................................641
Filtering Dropdown List Box Content...................637
Filtering in the Database Tier vs. Middle Tier .....645
Generating Crystal Reports documents..............659
Implementing integrated Windows authentication
.........................................................................653
Keeping a page onscreen after clicking Save.....582
Moving the Sign-in Control to Another Directory.590

z Page 740

Paging and Sorting in the Database Tier vs. Middle


Tier .................................................................. 646
Pre-Selecting Field Values Based on Logged-in
User ................................................................. 599
Pre-Setting Field Values of New Records .......... 600
Programmatically Accessing Database Records 619
Removing **Please Select** from Radio Button List
(or Dropdown List)........................................... 610
Setting one field value when another field is
selected ........................................................... 597
Setting the sort order for a Table Component .... 647
Storing extra information at sign-in time ............. 657
Updating Existing Records.................................. 621
Updating Existing Records From a Windows
Application....................................................... 622
Using a Large List Selector................................. 587
Using XML-Encoded Record Identifiers Passed via
URL ................................................................. 617
Validating a field value immediately after entering
text................................................................... 596
Collation sequences................................................. 387
Column class folder.................................................. 287
Column totals configuration........................................ 43
Columns
Custom................................................................ 623
Editable ................................................................. 41
Grand total ............................................................ 43
Justification ........................................................... 41
Multi-field display ................................................ 552
Page total .............................................................. 43
Required................................................................ 41
Searchable ............................................................ 42
Sortable................................................. 42, 541, 553
Columns pass-through attribute ............... 246, 247, 250
Command name....................................................... 210
Add Record ................................................. 210, 243
Custom........................................................ 210, 243
Delete Record ............................................. 210, 243
Export Data ................................................. 210, 243
Filter Data............................................................ 243
Go to Next ........................................................... 243
Go to Previous .................................................... 243
Log Out ....................................................... 210, 243
Redirect....................................................... 210, 243
Refresh Data ....................................................... 210
Reset Data .......................................................... 243
Search......................................................... 210, 243
Update Data ................................................ 210, 243
CommandArgument
deleteonupdate ................................................... 243
CommandArgument pass-through attribute............. 243

CommandName pass-through attribute ...................243


Commands
Application Builder Options .............................105
Application Builder...........................................128
Application Explorer, Databases folder .............56
Build ......................................................................49
Build All .................................................................49
Build Options ...................................................107
Configure Start Page .........................................54
Create Virtual Foreign Key ................................65
New Application .................................................26
New Query.........................................................74
Page Properties .................................90, 131, 255
Role-Based Security..........................................84
Run........................................................................50
Scan All Tables for Changes.................................77
CompareValidator class ...........................................350
CompareValidator presentation control tag..............298
Compatibility Between Professional and Enterprise
Editions .................................................................410
Compilation...............................................................267
Compilation options ..................................................107
CompileApplication utility program ...................270, 422
Compiler selection ....................................................107
Compiling Applications in Debug Mode....................451
Component binding ..................................................118
Component configuration .........................................131
Component interaction
Page redirection ..................................................217
Producer / consumer events ...............................253
Component properties
Attribute pass-through.........................................238
Component Use Tags ..............................................189
ComponentDefinition element ..................................687
Component-Level Security .........................................91
Components
Conditionally displaying by search result ............607
Components folder ...................................................277
ComposedOf element ..............................................690
Computed in Database...............................................58
Concurrency
In generated applications ....................................386
Optimistic.............................................................385
Pessimistic ..........................................................385
Concurrency Control.................................................383
Concurrency Handling in Generated Applications ...386
Concurrent Users .....................................................400
Conditionally Displaying Components by Search Result
..............................................................................607
Conditionally Displaying Table Columns ..................609
Conditionally Displaying Tables by Search Result...609

z Page 741

Conditionally Formatting Table Text Colors............. 610


Conditionally Hiding User Interface Controls ........... 604
Configuration
Run-time.............................................................. 408
Configuration files
Web.config .................................................. 396, 401
Configuration folder.................................................. 286
Configuration settings
ConnectionX........................................................ 402
CustomErrors ...................................................... 408
DefaultPageUrl.................................................... 404
EmailFrom........................................................... 404
EmailServer......................................................... 404
ErrorPageUrl ....................................................... 405
ForbiddenPageUrl............................................... 405
httpRuntime......................................................... 408
LogCommitExceptions ........................................ 405
LogDatabaseException....................................... 406
PrecompilePageFiles .......................................... 406
Server.................................................................. 406
SessionState ............................................... 396, 408
SignedOutPageUrl .............................................. 407
SignInPageUrl ..................................................... 407
Configure Sign-In Page.............................................. 88
Configure Start Page Options .................................... 54
Configuring
Layout pages ...................................................... 131
Configuring Build Options ........................................ 107
Configuring Column Totals......................................... 43
Configuring Database Authentication for Applications
.............................................................................. 431
Configuring Fields ...................................................... 41
Configuring Filtering ................................................... 42
Configuring Parent-Child (Master-Detail) Pages........ 43
Configuring Sign In and Sign Out Pages ................... 90
Configuring the Application Builder.......................... 105
Connecting to an Existing Database.......................... 37
Connection pooling .................................................. 327
ConnectionX database connection string ................ 402
Constraints
Enumerated value................................................. 72
Not null .................................................................. 73
Consumers ....................................................... 212, 244
None............................................................ 212, 244
Page............................................................ 212, 244
Parent.................................................................. 212
Parent control...................................................... 244
Parent record ...................................................... 212
Parent table......................................................... 212
ParentRecord ...................................................... 244
ParentTable......................................................... 244

Consumers pass-through attribute ...........................244


ContainedComponent element.................................692
Control tags ..............................................................296
Controls
Adding third-party controls ..................................475
Sign-in .................................................................590
Conversion
Field options ..........................................................66
Cookies.....................................................................371
Copy and run
Directory and file paths .......................................689
Installing stored procedures ................................282
Copying Properties Files ..........................................683
Copying Stored Procedures to a Production Server 418
Copying Your Application to a Production Server ....417
CopyRecord method.........................................337, 339
Country field type........................................................60
CountryValidator class .............................................351
Create a Virtual Directory for Your Application ........418
Create from database display style ..........203, 205, 206
create method...................................................337, 338
CreateRecord method ..............................................322
Creating a DataTable Object to use with Third-Party
Controls.................................................................629
Creating a Large List Selector..................................585
Creating a Virtual Directory for Your Application......424
Creating and Customizing Page Templates.............486
Creating Custom Table Columns .............................623
Creating Layout Pages.............................................112
Creating User Accounts in your Database .................84
Creating User Roles ...................................................86
Creating Virtual Foreign Keys ....................................65
Creating Web Pages with the Application Builder......28
Creating Your First Applications.................................26
Credit card expiration date field type....................60, 68
Credit card number field type .....................................60
CreditCardDateValidator class .................................351
CreditCardNumberValidator class............................352
Crystal Reports.........................................................659
CssClass pass-through attribute ......................246, 247
Culture ........................................................................96
RESX file .............................................................280
Culture encoding ........................................................32
Culture Encoding ........................................................95
Currency field type................................................60, 68
Currency format localization.......................................98
Currency formatting ....................................................70
Currency Formatting and Validation...........................98
CurrencyValidator class ...........................................352
Cursor Management.................................................386
Custom action...........................................................212

z Page 742

Custom button action ............................................... 210


Custom button command ......................................... 243
Custom code
Generating from templates ................................. 508
Custom command .................................................... 212
Custom controls ....................................................... 450
Custom Date and Time Format Strings ..................... 69
Custom events ......................................................... 254
Custom Function Example ....................................... 236
Custom HTTP Headers, Bodies, and Other Page
Sections ................................................................ 294
Custom Numeric Format Strings................................ 70
Custom Pass-Through Attributes ............................. 238
Custom selection criteria.......................................... 232
Custom SQL queries.................................................. 74
CustomErrors configuration setting.......................... 408
Customizing
Application authentication behavior .................... 653
Calling an External Web Service from a Data
Access Class................................................... 674
Data validation code ........................................... 592
Data validation logic............................................ 593
Error messages................................................... 592
Making Your Application a Web Service............. 670
Page security enforcement ................................. 652
Sending Email from an Application ..................... 670
Sign in page appearance .................................... 652
Sign-in controls ................................................... 590
Using external DLLs in applications................... 669
Using Microsofts calendar control to pick dates. 666
Windows authentication ...................................... 653
Customizing Application Authentication Behavior.... 653
Customizing Data Validation Logic .......................... 593
Customizing Page Security Enforcement ................ 652
Customizing Sign In and Sign Out Page Appearance
.............................................................................. 652
Customizing Table Component Filtering.................. 630
Customizing the Default Error Message .................. 592
Customizing the Sort Order of Field Value Items..... 603
Customizing the Sort Order of Table Components .. 648
CustomValidator class ............................................. 353
CustomValidator presentation control tag................ 299
Dangerous Request.Form value .............................. 437
Dashboard
Displaying summary information......................... 174
With advanced queries ....................................... 574
Dashboard Page ...................................................... 571
Dashboard Page with Advanced Queries ................ 574
Data Access
Adding New Records .......................................... 619
Custom Columns ................................................ 623

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

Primary key use .................................................. 381


Schema information .............................................. 57
Server name.......................................................... 34
Session management ......................................... 327
Show system databases ....................................... 37
Stored procedure generation .............................. 108
Stored procedures ...................................... 373, 625
Table name restrictions......................................... 37
User name....................................................... 35, 37
Database access code............................................... 21
Database classes..................................................... 334
Database connection wizard ...................................... 37
Database Exception Errors ...................................... 390
Database Field Name Restrictions............................. 37
Database fields
Case conversion ................................................... 67
Display foreign key as........................................... 62
Display formats ............................................... 66, 67
Storage formats .............................................. 67, 71
Trim function ......................................................... 67
Database layer ................................................... 21, 267
Database pages
Show table pages ................................................. 28
Database selection..................................................... 37
Database Stored Procedures................................... 373
Database table name restrictions............................... 37
Database tables
Computed in DB.................................................... 58
Constraints ............................................................ 67
Default field display............................................... 56
Default values ....................................................... 66
Deleting ................................................................. 78
Display name ........................................................ 59
Include in application ............................................ 58
Index ..................................................................... 58
Linking................................................................... 37
Mapping old fields to new ones............................. 78
Multi-table joins ................................................... 232
Name restrictions .................................................. 37
Not-null constraint ........................................... 58, 73
Parent-child relationships...................................... 43
Primary key constraint .......................................... 58
Refreshing schemas ............................................. 77
Removing from application ................................... 38
Schema information .............................................. 57
Selecting ............................................................... 37
Text box columns.................................................. 59
Unlinking from application..................................... 38
Updating schemas ................................................ 77
User role................................................................ 87
Validation type ...................................................... 59

Virtual foreign key..................................................63


Virtual primary key.................................................63
Database views
Creating...............................................................380
Selecting................................................................37
Support................................................................380
Database Views........................................................379
Databases
Linked....................................................................39
DataChanged events................................................254
DataGrid controls......................................293, 389, 629
DataList controls.......................................................293
DataReaderAlwaysSortBy pass-through attribute....250
DataReaderSortBy pass-through attribute ...............250
DataSet class ...........................................................389
DataSets...................................................................389
DataTable objects.....................................................629
Date and time format strings ......................................69
Date and time formatting ............................................69
Date field type.......................................................61, 68
Date format localization..............................................99
Date picker ...............................................................666
Date range filters ......................................................539
DateFieldValueFilterControl class ............................366
DateFieldValueFilterControl presentation control tag
..............................................................................299
DateTimeValidator class ..........................................354
Debug mode .............................................................451
Debugging
Compiling in debug mode ...................................451
Run-time application tracing................................452
Decimal number field type....................................61, 68
Decimal number formatting ........................................70
Default field display ....................................................56
Default page size......................................................250
Default sort order......................................................159
Default table size ......................................................159
Default.aspx file ........................................................270
DefaultPageUrl configuration setting........................404
Delete Record Button .................................................30
Delete Record button action.....................................210
Delete Record button command...............................243
deleteonupdate pass-through attribute ....................243
DeleteRecord events ................................................254
deleteRecord method .......................................337, 338
Deleting Tables from Your Database .........................78
Deploying Applications to a Production Server ........417
Deselecting a Table....................................................38
Design themes..........................................................486
Automatic layout page creation...........................107
Best uses of.........................................................264

z Page 744

Cascading style sheet......................... 281, 282, 505


Definition of ......................................................... 487
Everest ................................................................ 487
In Professional Edition and Enterprise Edition.... 410
Kilimanjaro .......................................................... 487
Matterhorn........................................................... 487
McKinley.............................................................. 487
Page location ...................................................... 107
Page template folder........................................... 284
Presentation layer customization........................ 263
Selecting in Application Builder............................. 33
Shasta ................................................................. 487
Vanilla ................................................................. 487
Design Themes ........................................................ 487
Design-Time Filtering ............................................... 224
DHTML
In generated pages ............................................. 291
Dialog titles............................................................... 580
Directory
Application............................................................. 32
Disabling Concurrency Validation for a Single Page596
Disconnecting a Database ......................................... 39
Display a master-detail page.................................... 562
Display a Record...................................................... 513
Display a table of records......................................... 535
Display a table with a range filter ............................. 539
Display a table with alternating rows........................ 547
Display a table with different alternating rows.......... 549
Display a table with multiple fields within a column . 552
Display a table with multiple fields within a sortable
column .................................................................. 553
Display a table with page and grand totals .............. 544
Display a table with search ...................................... 537
Display a table with sortable column headings ........ 541
Display a Table Within a Table ................................ 555
Display foreign key as .......................................... 41, 62
Display format
Capitalized ............................................................ 67
Data conversion options ....................................... 66
Lowercase............................................................. 67
Options.................................................................. 56
Uppercase............................................................. 67
Display formats .......................................................... 67
Display images based on URLs from a database.... 524
Display images from database................................. 522
Display name.............................................................. 41
Field ...................................................................... 59
Display Record with fields using checkboxes .......... 515
Display Record with fields using dropdown lists ...... 520
Display Record with fields using radio buttons ........ 517
Display Record with Search and Pagination............ 567

Display Record with Search for Record ...................565


Display styles
Check box ...........................................................202
Create from database
Button list...........................................................206
Dropdown list ....................................................203
List box ..............................................................205
Dropdown list.......................................................200
File upload...........................................................202
Image ..................................................................202
Image button .......................................................201
Label....................................................................198
Link button...........................................................201
List box ................................................................200
Literal...................................................................198
Maximum items to display...................203, 205, 207
Null value text..............................................204, 206
Push button .........................................................201
Radio button ........................................................200
Required..............................................................198
Specify items .......................................................203
Text box...............................................................198
Text box mode.....................................................208
Text box width .....................................................208
Text mode ...........................................................208
Displaying page totals ......................................168, 174
DLL files
<APP Name>.dll..................................................272
BaseClasses.dll...........................................272, 286
CompileApplication utility ....................................422
DLLs
Using third-party ..................................................669
Domain controller machine.......................................444
Dropdown list display style .......................................200
Dropdown lists
Record selection with ..........................................520
Dropdown Lists
Large number of items ........................................585
DropDownList presentation control tag ....................300
Edit icon
Properties ............................................................219
Edit Record Page .....................................................528
Edit record pages
Automatically creating .........................................106
Page templates ...................................................284
Pre-defined page type...........................................29
Properties ............................................................257
Edit table pages
Automatically creating .........................................106
Page templates ...................................................284
Editable.......................................................................41

z Page 745

Editable table............................................................ 156


Editable Tables ........................................................ 156
Editing Resource Files ....................................... 32, 103
EditMultipleRecords Template type ......................... 492
EditOneRecord Template type................................. 492
Email address field type ............................................. 61
EmailFrom configuration setting............................... 404
EmailServer configuration setting ............................ 404
EmailValidator class................................................. 354
Embedding code ...................................................... 478
Embedding controls ......................................... 475, 478
Enabled pass-through attribute ................................ 248
Enabling an Edit Icon in a Table Control.................. 219
Enabling Language Support in Microsoft Windows . 103
Encoding
Character sets....................................................... 98
Culture................................................................... 95
Pages .................................................................... 98
EnforceAccessProtocol method ............................... 330
EnforceAccessRequirements method...................... 656
Enter key handling ................................................... 313
Enterprise Edition
Compatibility with Professional Edition ............... 410
Enterprise Manager configuration ............................ 433
Enumerated Field Value Constraints ......................... 72
Equals method ................................................. 337, 338
Err resource key prefix ............................................. 102
Error and Validation Message Strings ....................... 99
Error handling........................................................... 390
Application logic errors........................................ 391
Database exception errors.................................. 390
Event logging ...................................................... 391
Interal errors........................................................ 390
User input validation errors ................................. 390
Error messages
A potentially dangerous Request.Form........... 437
Cannot update [tablename] ............................. 438
Customizing ........................................................ 592
Time out........................................................... 439
Error page
Setting ............................................................. 54, 55
ErrorPageUrl configuration setting ........................... 405
Errors
Properties Files ................................................... 684
Event consumers
None.................................................................... 212
Page.................................................................... 212
Parent.................................................................. 212
Parent record ...................................................... 212
Parent table......................................................... 212
Event element .......................................................... 692

Event hookups..................................................253, 257


Event Logging...........................................................391
EventBindings element.............................................691
Events...............................................................253, 257
AddRecord ..........................................................254
Custom ................................................................254
DataChanged ......................................................254
DeleteRecord ......................................................254
ExportRecord ......................................................254
FilterData.............................................................254
LogOut.........................................................254, 331
Notifications.........................................................212
Producer / consumer...................................253, 257
Recirect ...............................................................254
ResetData ...................................................255, 331
Search .................................................................255
UpdateData .................................................255, 331
Example
An Add Order Page .............................................276
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 an External Web Service from a Data
Access Class ...................................................674
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
Creating a DataTable Object to use with Third-Party
Controls ...........................................................629
Creating a Large List Selector.............................585
Creating Custom Table Columns ........................623
Customizing application authentication behavior 653
Customizing data validation logic........................593
Customizing Page Security Enforcement ...........652
Customizing Sign In and Sign Out Page
Appearance .....................................................652
Customizing Table Component Filtering .............630

z Page 746

Customizing the default error message .............. 592


Customizing the Sort Order of Field Value Items603
Customizing the Sort Order of Table Components
......................................................................... 648
Dashboard page ................................................. 571
Dashboard page with advanced queries ............ 574
Disabling Concurrency Validation for a Single Page
......................................................................... 596
Display a master-detail page .............................. 562
Display a record .................................................. 513
Display a record with fields using checkboxes ... 515
Display a record with fields using drop down list 520
Display a record with fields using radio buttons.. 517
Display a record with search for a record ........... 565
Display a table of records ................................... 535
Display a table with a range filter ........................ 539
Display a table with alternating rows .................. 547
Display a table with different alternating rows .... 549
Display a table with multiple fields within a column
......................................................................... 552
Display a table with multiple fields within a sortable
column ............................................................. 553
Display a table with page and grand totals ......... 544
Display a table with search ................................. 537
Display a table with sortable column headings... 541
Display a table within a table .............................. 555
Display images based on URLs from a database
......................................................................... 524
Display images from a database ........................ 522
Display record with search and pagination ......... 567
Edit record page.................................................. 528
Filtering a show table page using a field not in the
table................................................................. 641
Filtering Dropdown List Box Content .................. 637
Filtering in the Database Tier vs. Middle Tier ..... 645
Generating Crystal Reports documents.............. 659
Implementing integrated Windows authentication
......................................................................... 653
Keeping a page onscreen after clicking Save..... 582
Making Your Application a Web Service............. 670
Moving the Sign-in Control to Another Directory 590
Paging and Sorting in the Database Tier vs. Middle
Tier .................................................................. 646
Parameter passing in URLs ....................... 216, 217
Passing primary key values in URLs ................. 216
Pre-Selecting Field Values Based on Logged-in
User ................................................................. 599
Pre-Setting Field Values of New Records .......... 600
Programmatically Accessing Database Records 619
Removing **Please Select** from Radio Button List
(or Dropdown List)........................................... 610

Sending Email from an Application .....................670


Setting one field value when another field is
selected ...........................................................597
Setting the sort order for a Table Component.....647
Storing extra information at sign-in time .............657
Updating Existing Records..................................621
Updating Existing Records From a Windows
Application .......................................................622
Using a Large List Selector .................................587
Using External DLLs in Applications ..................669
Using Microsofts calendar control to pick dates.666
Using XML-Encoded Record Identifiers Passed via
URL..................................................................617
Validating a field value immediately after entering
text ...................................................................596
Exception and Error Management............................390
Explicit foreign key relationships ..............................231
Export Data button action.........................................210
Export Data button command...................................243
Export Table Wizard ...................................................30
ExportData events ....................................................254
Exporting foreign key fields ........................................30
Exporting passwords ..................................................30
Extending the code generator ..................................508
External DLLs
Bin folder location................................................483
In applications .....................................................669
FDV (field display string) button redirect parameter.215
Field classes.............................................................344
Field constraints
Boolean .................................................................72
Computed in Database .........................................58
Constraint ..............................................................67
Country..................................................................72
Credit Card Expiration Date ..................................73
Credit Card Number ..............................................72
Currency................................................................72
Date.......................................................................73
Decimal Number....................................................72
Email .....................................................................72
File.........................................................................72
Include table in application....................................58
Index......................................................................58
Not Null..................................................................58
Number..................................................................72
Password...............................................................72
Primary key ...........................................................58
String .....................................................................72
URL .......................................................................72
US Phone Number ................................................72
US State ................................................................72

z Page 747

US ZIP Code ......................................................... 72


Field Display Options ................................................. 59
Field Display Tags.................................................... 135
Field name.................................................................. 41
Field name restrictions ............................................... 37
Field order .................................................................. 41
Field pass-through attribute ............................. 246, 247
Field type
Boolean ........................................................... 60, 67
Country.................................................................. 60
Credit card expiration date.............................. 60, 68
Credit card number ............................................... 60
Currency.......................................................... 60, 68
Data....................................................................... 61
Date....................................................................... 68
Decimal number.............................................. 61, 68
Email address ....................................................... 61
File ........................................................................ 61
Floating point number ........................................... 61
Image .................................................................... 61
Integer number...................................................... 61
Number ................................................................. 68
Password .............................................................. 61
Percentage...................................................... 61, 68
String..................................................................... 61
URL ....................................................................... 62
US phone number................................................. 61
US state .................................................... 62, 69, 72
US ZIP code.......................................................... 62
User-defined.......................................................... 62
Very large string.................................................... 62
Field Validation Types................................................ 59
Field values
Logged-in user .................................................... 599
Pre-setting values ............................................... 597
Sorting................................................................. 603
FieldFilter Code Generation Tag.............................. 182
FieldFilter element.................................................... 700
FieldFilter tag
Columns pass-through attribute.......................... 246
Display style ........................................................ 184
Dropdown list display style.................................. 184
Field pass-through attribute ................................ 246
Field to filter......................................................... 185
FieldValueStyle pass-through attribute............... 246
Filter Data Options .............................................. 184
Filtering operator................................................. 185
Ignore time when filtering.................................... 185
Operator pass-through attribute.......................... 246
Pass-through attributes....................................... 246
Properties............................................................ 182

Display style ......................................................184


Field...................................................................185
Ignore time ........................................................185
Operator ............................................................185
Table .................................................................185
Text box width ...................................................184
Table to filter........................................................185
Text box display style..........................................184
Text box width .....................................................184
User Interface Options ........................................183
FieldFilter Tag Pass-Through Attributes...................246
FieldLabel tag
Description of ......................................................137
Field pass-through attribute ................................246
Field selection options.........................................139
Hyperlink display style.........................................138
Label display style ...............................................138
Label text.............................................................138
Literal display style ..............................................138
Pass-through attributes .......................................246
Properties ............................................................137
Display style ......................................................138
Field...................................................................139
Label text...........................................................138
Table, view or query..........................................139
Table pass-through attribute ...............................247
Text pass-through attribute .................................247
User Interface Options ........................................138
FieldLabel Tag Pass-Through Attributes..................246
FieldNameLabel presentation control tag ................301
Fields
Categorizable ........................................................42
Data validation.................................................56, 59
Display options ......................................................56
Displaying........................................................56, 59
Enumerated values ...............................................72
Filter ......................................................................42
Showing and disabling ..........................................41
Validation types .....................................................56
Fields pass-through attribute............................246, 250
FieldSort element .....................................................701
FieldSortControl class ..............................................367
FieldSortControl presentation control tag.................302
FieldStatistic element ...............................................702
FieldStatistic tag
All pages scope ...................................................169
Calculation scope ................................................169
Current page scope.............................................169
Description of ......................................................168
Field pass-through attribute ................................247
Field to calculate .................................................169

z Page 748

FieldStatisticType pass-through attribute ........... 247


Pass-through attributes....................................... 247
Properties.................................................... 168, 169
Field .................................................................. 169
Scope ................................................................ 169
Statistic type...................................................... 169
Table, view or query.......................................... 169
Statistic type........................................................ 169
Table pass-through attribute ............................... 247
Table to calculate................................................ 169
FieldStatistic Tag Pass-Through Attributes.............. 247
FieldStatisticType pass-through attribute................. 247
FieldValue element .................................................. 703
FieldValue tag
Check box display style ...................................... 202
CheckedValue pass-through attribute ................ 247
Columns pass-through attribute.......................... 247
Create dropdown list from database................... 203
Creating radio button lists from database ........... 206
CssClass pass-through attribute......................... 247
Data Source Properties....................................... 198
Description of .............................................. 125, 135
Display Style Properties...................................... 198
Dropdown list display style.................................. 200
Dropdown List Display Style Options.................. 203
Enabled pass-through attribute........................... 248
Field to use.......................................................... 198
File upload display style...................................... 202
HTML encode white space ......................... 204, 206
Image Button Action Options .............................. 203
Image button display style .................................. 201
Image display style ............................................. 202
Label display style............................................... 198
Label Display Style Options ................................ 203
Link Button Action Options.................................. 204
Link button display style...................................... 201
List box display style ........................................... 200
List Box Display Style Options ............................ 204
Literal display style.............................................. 198
Literal Display Style Options ............................... 205
LoadData pass-through attribute ........................ 247
MaxGenItems pass-through attribute ................. 247
Maximum items to display in dropdown list ........ 203
Maximum items to display in list box .................. 205
Maximum items to display in radio button lists ... 207
MinListItems pass-through attribute.................... 248
NullValueText pass-through attribute ................. 248
ParentIdField pass-through attribute .................. 251
Pass-through attributes............................... 247, 251
Properties............................................................ 197
Button styles ..................................................... 201

Create from database .......................203, 205, 206


Field...................................................................198
HTML encode white space........................204, 206
List styles...........................................................200
Maximum items to display.................203, 205, 207
Null value text............................................204, 206
Required............................................................198
Specify items.....................................203, 205, 207
Table, view or query..........................................198
Text box columns ..............................................208
Text box rows....................................................208
Text mode .........................................................208
Text styles .........................................................198
Push Button Action Options ................................206
Push button display style ....................................201
Radio button list display style..............................200
Radio Button List Display Style Options .............206
Required field style..............................................198
Rows pass-through attribute ...............................248
SaveData pass-through attribute ........................248
Specifying items in dropdown list ........................203
Specifying items in list box ..................................205
Specifying items in radio button lists ...................207
Specifying items to display in list box..................205
Specifying null value text in labels ......................204
Specifying null value text in literals .....................206
Stand-alone .........................................................126
Table to use.........................................................198
Text box columns ................................................208
Text Box Display Style Options...........................207
Text box rows ......................................................208
Text display style.................................................198
Text mode ...........................................................208
Text styles ...........................................................198
TextFormat pass-through attribute......................248
TextMode pass-through attribute ........................248
UncheckedValue pass-through attribute.............248
Using several together ........................................127
FieldValue Tag Basic Database Field Display ......125
FieldValue Tag Pass-Through Attributes .................247
FieldValue, Record Control, and Table Control Query
Panel Pass-Through Attributes.............................251
FieldValueFilterControl class....................................367
FieldValueStyle pass-through attribute ....................246
FieldValueTextBox presentation control tag ............301
FieldValueValidator class .........................................354
FieldValueValidator presentation control tag ...........301
File field type ..............................................................61
File or assembly name xxx.DLL, or one of its
dependencies ....................................................438
File organization .......................................................269

z Page 749

File upload display style ........................................... 202


fileEncoding................................................................ 96
Files
ASCX .................................................................. 276
ASPX................................................................... 276
BaseClasses.resx resource file........................... 101
Page generated class ......................................... 276
Page safe class................................................... 276
ProjectTemplate.resx resource file ..................... 100
Record class ....................................................... 275
Resource file format............................................ 101
SQL access class ............................................... 275
Stored procedure ................................................ 281
Table access class.............................................. 275
Table binding file location ................................... 280
Table definition class .......................................... 275
Files Created by Iron Speed Designer..................... 279
FileValidator class .................................................... 355
Filter ........................................................................... 42
Filter classes ............................................................ 363
Filter controls
Generating automatically .................................... 106
Properties............................................................ 182
Sample filters ...................................................... 106
Filter Tags ................................................................ 180
FilterData button command...................................... 243
FilterData events ...................................................... 254
Filtering
Database tier....................................................... 645
Design-time ......................................................... 224
Dropdown list box content................................... 637
Middle tier.................................................... 635, 645
Queries................................................................ 633
Show table page ................................................. 641
Filtering a Show Table Page using a Field Not in the
Table..................................................................... 641
Filtering configuration................................................. 42
Filtering Dropdown List Box Content ....................... 637
Filtering in the Database Tier vs. Middle Tier .......... 645
Filtering table components ....................................... 630
Filters
Date range .......................................................... 539
Specifying in code............................................... 482
Firewall Security ....................................................... 397
Firewalls
Blocking web servers .......................................... 436
FK (foreign key name) button redirect parameter .... 215
Floating point number field type ................................. 61
Folder organization .................................................. 269
Folder structure
Base class

Bin folder ...........................................................286


Column classes folder.......................................287
Configuration folder...........................................286
Data model class folder.....................................287
Data reader class folder ....................................287
SQL provider class folder..................................287
Utility folder........................................................287
Web folder .........................................................288
Base class folder .................................................285
Base class object files folder...............................287
Bin folder .............................................272, 279, 283
Components folder ..............................................277
Data model class files .........................................275
DataAccess folder .......................................273, 280
Globalization resources folder.............................283
Images folder...............................................276, 280
Iron Speed Designer folder .................................283
Other components folder.....................................280
Other pages folder.......................................278, 280
Page templates folder .........................................284
Project folder .......................................................269
Project template folder ................................288, 289
Source folder .......................................................278
Stored procedures folder.....................................281
Styles folder.................................................281, 282
Footer element .........................................................714
Footer panel
Page-level property .............................................133
Panel types..........................................................490
FooterTemplate tag
Description of ......................................................166
Forbidden page
Setting ...................................................................55
ForbiddenPageUrl configuration setting ...................405
ForEach code generation tag ...................................492
ForEach tag
Description of ......................................................194
Foreign Key Use.......................................................382
Foreign keys
Adding virtual foreign keys ....................................64
Case sensitivity ...................................................383
Composite ...........................................................383
Conflicts with default field values ........................438
Data type restrictions ..........................................383
Displaying........................................................41, 62
Explicit ...................................................................64
Explicit (defined in database) ..............................231
Exporting foreign key fields ...................................30
Implicit .................................................................231
In Professional Edition and Enterprise Edition....410
In URL query strings ...........................................215

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

HTML Use Inside Record Tags................................ 141


HTML, Literal, and Text Tag Pass-Through Attributes
.............................................................................. 249
HTTP
Page headers and bodies ................................... 294
HTTP Error 403 Forbidden. You are not authorized
to view this page ............................................... 438
HttpRequestValidationException.............................. 437
httpRuntime configuration setting............................. 408
Hyperlink
FieldLabel tag display style................................. 138
HyperLink element ................................................... 716
HyperLink presentation control tag .......................... 302
Hyperlink tag
NavigateURL pass-through attribute .................. 249
Pass-through attributes....................................... 249
Target pass-through attribute.............................. 249
Text pass-through attribute ................................. 249
HyperLink tag
Description of ...................................................... 145
Display properties ............................... 145, 147, 148
Properties............................................................ 145
Redirect URL .................................................... 146
Target window................................................... 146
Text ................................................................... 146
Redirect URL....................................................... 146
Target Window option ......................................... 146
Text display ......................................................... 146
Hyperlink Tag Pass-Through Attributes ................... 249
ID button redirect parameter .................................... 215
IFrames .................................................................... 292
Image button display style........................................ 201
Image display ................................................... 522, 524
Image display style................................................... 202
Image element.......................................................... 716
Image field type .......................................................... 61
Image file (URL) ............................................... 147, 209
Image presentation control tag................................. 303
Image tag
Description of ...................................................... 146
Hello world example............................................ 119
Image file (URL).................................................. 147
Properties............................................................ 146
Image file (URL)................................................ 147
ImageButton element ............................................... 717
ImageButton presentation control tag ...................... 303
ImageButton tag
Description of ...................................................... 177
Pass-through attributes....................................... 243
Properties............................................................ 177
Action ................................................................ 210

Custom action ...................................................212


Image file (URL) ................................................209
Redirect parameters..........................................214
Redirect URL.....................................................214
Send event notification to..................................212
Tool tip...............................................................210
Validate page data ............................................210
Images
Display from a URL in a database ......................711
Images folder....................................................276, 280
ImageURL pass-through attribute ............................245
ImageValidator class ................................................355
Implementing Integrated Windows Authentication
(Single Sign In) .....................................................653
Implementing Windows Authentication with .NET
Impersonation .......................................................394
Implicit foreign keys
Adding ...................................................................64
As data sources...................................................231
Improving Application Performance .........................400
Include table in application .........................................58
Independent Third Party Controls ............................475
Index...........................................................................58
Inline SQL generation...............................................108
Installing on a Domain Controller Machine (Windows
2000 Server) .........................................................444
Integer number field type............................................61
Integrating Custom Code with Your Application.......263
Integrating Third Party Controls with the Database .478
Internal Errors...........................................................390
Internationalization .....................................................94
Internationalizing (Localizing) Your Application .........94
Introducing Iron Speed Designer................................18
Iron Speed Designer...................................................18
Application Builder tab ..........................................22
Application Explorer tab ........................................24
Start tab.................................................................22
Upgrading............................................................103
Iron Speed Designer Custom Controls.....................450
Iron Speed Designer folder ......................................283
Iron Speed Personal Web Server.............................455
IronSpeedBase folder...............................................285
IronSpeedBase.sln file .............................................285
IsReadOnly method..........................................336, 338
IsReRequest method................................................331
ItemTemplate tag
Description of ..............................................154, 160
JavaScript
Client-side ...........................................................291
Client-side validation ...................................271, 289
Enter key handling ..............................................270

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

Custom action ...................................................212


Redirect parameters..........................................214
Redirect URL.....................................................214
Send event notification to..................................212
Tool tip...............................................................210
Validate page data ............................................210
Linked Databases.......................................................39
Linking Generated Add, Edit, Show Record and Show
Table Layout Pages..............................................129
List box display style.................................................200
Literal
FieldLabel tag display style .................................138
Literal display style ...................................................198
Literal element ..........................................................720
Literal tag
Description of ......................................................149
Display properties................................................150
HTML encode white space..................................150
Literal text............................................................150
Pass-through attributes .......................................249
Properties ............................................................149
HTML encode white space................................150
Literal.................................................................150
Text pass-through attribute .................................249
Load balancing applications across servers ............399
LoadData pass-through attribute..............................247
LoadPageStateFromCache method.........................331
LoadPageStateFromDefaultPersistanceMedium
method ..................................................................331
LoadPageStateFromFile method .............................331
LoadPageStateFromString method..........................331
LoadStoredProcedures utility program.............282, 423
Localization.................................................................94
Character sets .......................................................98
Culture.............................................................32, 96
Culture encoding ...................................................95
Currency formatting and validation .......................98
Date formatting and validation ..............................99
Editing resource files...........................................103
Enabling language support in Microsoft Windows
.........................................................................103
Error and validation messages..............................99
fileEncoding...........................................................96
Formatting .............................................................32
Messages ..............................................................32
Page encoding ......................................................98
Page titles............................................................102
requestEncoding ...................................................96
responseEncoding ................................................96
uiCulture ..........................................................32, 96

z Page 753

United States phone numbers, states and ZIP


codes ............................................................... 104
Log Out button action............................................... 210
Log Out button command......................................... 243
LogCommitExceptions configuration setting............ 405
LogDatabaseExceptions configuration setting......... 406
Logged-in user ......................................................... 599
LoggedInUserID()..................................................... 235
Login failed ............................................................... 439
Login failed for user NT AUTHORITYSERVICE ...... 439
LogOut events .................................................. 254, 331
LogUnhandledException method ............................. 331
Long date format ........................................................ 69
Lowercase field formatting ......................................... 67
Machine.config
Configuration settings ......................................... 437
Security settings.................................................. 444
validateRequest settings..................................... 437
Making API Calls to Your Application ...................... 485
Making Your Application a Web Service.................. 670
Mapping Fields ........................................................... 78
Master-detail pages
Configuring............................................................ 43
Display a master-detail page .............................. 562
Example .............................................................. 562
Master-detail tables
Including on page.................................................. 44
MaxGenItems pass-through attribute....................... 247
Maximum items display style ................... 203, 205, 207
Menu element........................................................... 721
Menu panel
Creating............................................................... 464
Page-level property............................................. 133
Panel types ......................................................... 490
Menu text
For sign in and sign out pages.............................. 90
Menu_Item panel
Panel types ......................................................... 490
Menu_Item_Highlighted panel
Panel types ......................................................... 490
MenuLink presentation control tag ........................... 305
Menus
Adding to page.............................................. 45, 583
Third-party controls ............................................. 475
URL of selected page ........................................... 45
Messages localization ................................................ 32
Methods
AutoRedirectPostBack ........................................ 330
CopyRecord ................................................ 337, 339
create .......................................................... 337, 338
CreateRecord...................................................... 322

deleteRecord ...............................................337, 338


EnforceAccessProtocol .......................................330
EnforceAccessRequirements..............................330
Equals .........................................................337, 338
Get...............................................................320, 324
getCreate_Date ...................................................337
getCreate_DateAsSqlType .................................337
getCreator_Id ......................................................337
getCreator_IdAsSqlType.....................................337
GetCustomizedPagePath....................................330
getDisplayString ..................................................336
GetHashCode..............................................337, 338
getId ............................................................337, 339
getIdAsSqlType ...........................................337, 339
GetRecord ...................................................322, 330
GetSessionNavigationHistory .............................331
getString ..............................................................336
GetTable..............................................................331
getTypeName......................................................336
getUpdate_Date ..................................................337
getUpdate_DateAsSqlType.................................337
getUpdater_Id......................................................337
getUpdater_IdAsSqlType ....................................337
getValue ..............................................................336
getVariable ..........................................336, 338, 339
IsReadOnly..................................................336, 338
IsReRequest........................................................331
LoadPageStateFromCache.................................331
LoadPageStateFromDefaultPersistenceMedium 331
LoadPageStateFromFile .....................................331
LoadPageStateFromString..................................331
LogUnhandledException .....................................331
New ............................ 317, 321, 323, 325, 326, 338
OnError................................................................331
OnIronSpeedEvent..............................................331
Page_Init .............................................................317
Page_Init_InitSystem ..........................................332
Page_Init_RedirectToCustomizedPage..............332
Page_Load ..........................................................318
Page_Load_InitPageSettings..............................332
Page_PreRender_DataBindOnPostBack ...........332
Page_Unload_EndTransaction ...........................332
RedirectAfterEvent ..............................................332
RedirectToCustomizedPage ...............................332
RedirectToDefaultPage.......................................333
RedirectToForbiddenPage ..................................333
RedirectToLoginPage .........................................333
RedirectToSSLPage ...........................................333
RegisterClientScript.............................................333
RemoveCurrentRequestFromSessionNavigationHis
tory...................................................................333

z Page 754

Render ................................................................ 333


SavePageStateToCache .................................... 333
Set....................................................................... 320
SetResponseUncacheable ................................. 333
setString .............................................................. 336
setValue .............................................................. 336
setVariable .......................................... 336, 338, 339
UpdateData ......................................................... 333
Microsoft .NET
Educational resources ........................................ 457
Framework ............................................................ 21
Request validation security ................................. 437
Microsoft .NET Educational Resources ................... 457
Microsoft .NET Framework
Installation ........................................................... 443
Microsoft .NET Platform ............................................. 21
Microsoft IIS web server................................... 417, 419
Creating virtual directories .................................. 418
Installing .............................................................. 435
Personal web server alternative.......................... 455
Starting................................................................ 436
Microsoft SQL Server
Binary data type limitations ................................. 372
Collation sequences............................................ 387
Field name restrictions.......................................... 37
Login authentication............................................ 431
Security configuration ......................................... 433
SQL query performance...................................... 373
SQL_variant support ........................................... 373
System databases ................................................ 37
Transact-SQL stored procedures ....................... 375
Microsoft SQL Server Enterprise Manager .............. 433
Microsoft SQL Server is installed on a remote machine
.............................................................................. 433
Microsoft SQL Server is installed on the local machine
.............................................................................. 432
Microsoft Visual Design............................................ 452
Microsoft Visual Studio .NET ................................... 450
MinListItems pass-through attribute......................... 248
Modifying applications.............................................. 263
Modifying Generated Layout Pages......................... 128
Moving the Sign-in Control to Another Directory...... 590
Multiple Role Authentication....................................... 82
Multi-server operation .............................................. 399
Multi-table joins ................................................ 232, 574
Name restrictions
Database fields ..................................................... 37
Database names................................................... 37
Database tables .................................................... 37
Name spaces ........................................................ 32
Named queries...................................................... 76

Name space .............................................................422


Name Space...............................................................32
Name, application.......................................................31
Named queries ...........................................................74
Aliases...................................................................76
Name restrictions ..................................................76
Navigate URL ...........................................................249
NavigateURL pass-through attribute ........................249
Navigation menu bars...............................................464
Navigation Menu Panels (Menu Tabs) .....................464
Nested Table Tags ...................................................156
New method .................... 317, 321, 323, 325, 326, 338
No consumer ............................................................244
Not null constraints ...............................................58, 73
NT Authority Network Service ..................................439
Null value text display style ..............................204, 206
NullValueText pass-through attribute .......................248
Number field type .......................................................68
Number formatting......................................................70
NumberValidator class .............................................356
NumberValidator presentation control tag................305
Numeric format strings .........................................69, 70
Numeric formatting .....................................................70
Numeric string formatting ...........................................69
OnError method........................................................331
OnIronSpeedEvent method......................................331
LogOut.................................................................331
ResetData ...........................................................331
UpdateData .........................................................331
Opening a Page in a New Browser Window ............222
Operator pass-through attribute .......................246, 250
Optimistic concurrency .............................................385
Optional Properties...................................................122
Other components folder..........................................280
Other pages folder....................................................280
Other Security-Related Materials .............................398
Other Tags................................................................192
Overriding Pass-Through Attributes .........................241
Page class ................................................................328
Page class files
Generated class files...........................................276
Safe class files ....................................................276
Page classes ............................................................317
Page configuration......................................................41
Categorize .............................................................42
Display as..............................................................41
Display name.........................................................41
Editable .................................................................41
Filter ......................................................................42
Grand total.............................................................43
Include master-detail tables ..................................44

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

Page total ...................................................................43


Page totals................................................................544
Configuration .........................................................43
Page type .................................................................133
Page types
ASPX pages ........................................................486
Layout pages.......................................................486
Page templates ...................................................486
Page Types ..............................................................486
Page_Init method .....................................................317
Page_Init_InitSystem method ..................................332
Page_Init_redirectToCustomizePage method .........332
Page_Load method ..................................................318
Page_Load_InitPageSettings method......................332
Page_PreRender_DataBindOnPostack method ......332
Page_Unload_EndTransaction method ...................332
Page-based transaction model.................................371
Pages
Pre-defined page templates ..................................28
Pages
Creating a new page .............................................28
Pages
Sign in and sign out...............................................90
Pages
Sign in and sign out...............................................90
Pages
Automatic page creation
Table page options............................................105
Pages
Automatically creating
Edit table page ..................................................106
Pages
Automatically creating
Show table page ...............................................106
Pages
Automatically creating
Sample filter controls.........................................106
Pages
Automatically creating
Filter controls.....................................................106
Pages
Automatically creating
Search controls .................................................106
Pages
Automatically creating
Sortable column headings.................................106
Pages
Automatic page creation
Record page options .........................................106
Pages
Automatically creating .........................................106

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

ParentRecord consumer ..........................................244


ParentTable consumer .............................................244
Passing data via the URL.........................................126
Passing Other Values Between Pages ....................217
Passing parameters in a URL query string ..............234
Passing Parameters to Custom Functions...............237
Passing Primary and Foreign Key Values in URLs .216
Passing Primary Key Values Between Pages in URLs
..............................................................................216
Pass-Through Attribute Definitions...........................238
Pass-through attributes
Button tag ............................................................243
CausesValidation ..............................................243
CommandArgument ..........................................243
CommandName ................................................243
Consumers ........................................................244
deleteonupdate .................................................243
ImageURL .........................................................245
RedirectArgument .............................................245
Text ...................................................................245
ToolTip ..............................................................245
CategoryFilter tag................................................245
CssClass ...........................................................246
CssClass ...........................................................246
Fields.................................................................246
Table .................................................................246
Definition .............................................................238
During application generation .............................240
FieldFilter tag.......................................................246
Columns ............................................................246
Field...................................................................246
FieldValueStyle .................................................246
Operator ............................................................246
FieldLabel tag......................................................246
Field...................................................................246
Table .................................................................247
Text ...................................................................247
FieldStatistic tag ..................................................247
Field...................................................................247
FieldStatisticType..............................................247
Table .................................................................247
FieldValue tag .............................................247, 251
CheckedValue...................................................247
Columns ............................................................247
CssClass ...........................................................247
Enabled .............................................................248
LoadData...................................................242, 247
MaxGenItems....................................................247
MinListItems ......................................................248
NullValueText....................................................248
ParentIdField.....................................................251

z Page 757

Rows ................................................................. 248


SaveData .................................................. 242, 248
TextFormat........................................................ 248
TextMode .......................................................... 248
UncheckedValue............................................... 248
HTML tag ............................................................ 249
Text ................................................................... 249
Hyperlink tag ....................................................... 249
NavigateURL..................................................... 249
Target................................................................ 249
Text ................................................................... 249
ImageButton tag.................................................. 243
Initial value setting .............................................. 242
Label tag ............................................................. 249
Text ................................................................... 249
LinkButton tag ..................................................... 243
Literal tag ............................................................ 249
Text ................................................................... 249
Overriding............................................................ 241
PushButton tag ................................................... 243
Record tag........................................................... 251
ParentIdField..................................................... 251
Run-time behavior............................................... 240
SearchFilter tag................................................... 249
CaseSensitive ................................................... 250
Columns............................................................ 250
Fields................................................................. 250
Operator............................................................ 250
Table tag ..................................................... 250, 251
DataReaderAlwaysSortBy ................................ 250
DataReaderSortBy............................................ 250
PageSize........................................................... 250
ParentIdField..................................................... 251
TableStatistic tag ................................................ 251
QueryFunction .................................................. 251
QueryParameter ............................................... 251
TableName ....................................................... 251
Text tag ............................................................... 249
Text ................................................................... 249
Use tag................................................................ 251
HiliteSettings ..................................................... 251
Using ................................................................... 239
Pass-Through Attributes at Run-Time ..................... 240
Pass-Through Attributes During Application Generation
.............................................................................. 240
Password field type .................................................... 61
Password Storage.................................................... 397
Passwords
Database server.................................................... 35
Exporting ............................................................... 30
In User table.......................................................... 86

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

PasswordValidator .............................................. 306


PlaceHolder......................................................... 308
RadioButton ........................................................ 308
RecordControlCustomValidator .......................... 309
RecordControlImageButton ................................ 309
RequiredFieldValidator ....................................... 308
SearchTextControl .............................................. 310
ShortDateValidator.............................................. 310
TableControlFieldSumLabel ............................... 311
TableControlRadioButton.................................... 310
TableControlRepeater......................................... 311
TextBox ............................................................... 311
TextBoxMaxLengthValidator............................... 312
Presentation layer .............................................. 20, 266
Presentation Layer Control Tags ............................. 296
Pre-setting field values
Of new records.................................................... 600
Pre-selecting based on logged in user ............... 599
Setting one field value when another is selected 597
Pre-Setting Field Values .......................................... 597
Pre-Setting Field Values of New Records................ 600
Primary and Foreign Key Options .............................. 62
Primary Key Use ...................................................... 381
Primary keys
Constraint.............................................................. 58
In URL query strings ........................................... 215
Virtual .............................................................. 62, 63
Primary work areas .................................................... 24
Producer / Consumer Event Types .......................... 253
Producer / consumer events ............................ 253, 257
Producer Consumer Events ............................. 252, 253
Professional Edition
Compatibility with Enterprise Edition .................. 410
Programmatically Accessing Database Records ..... 619
Project folder ............................................................ 269
Project template
RESX file............................................................. 284
Project template folder ..................................... 288, 289
ProjectTemplate.resx validation message file.......... 100
Properties
Adding a new record to a database table ........... 228
Advanced filter criteria ........................................ 232
Built-in functions.................................................. 234
Button actions and properties ............................. 209
Button panel........................................................ 133
Button properties................................. 219, 220, 257
Button tag............................................................ 178
Categorization controls ....................................... 180
CategoryFilter tag ............................................... 180
Components................................................ 113, 131
Custom functions ........................................ 235, 236

Custom pass-through attributes ..........................238


Data sources .......................................................224
Edit icons.............................................................219
Edit record pages ................................................257
FieldFilter tag.......................................................182
FieldLabel tag......................................................137
FieldStatistic tag ..................................................168
FieldValue tag .....................................................197
Footer panel ........................................................133
Header panel.......................................................133
HTML tag.............................................................143
HyperLink tag ......................................................145
Image tag ............................................................146
ImageButton tag ..................................................177
Joining multiple tables.........................................232
Label tag..............................................................148
Literal tag.............................................................149
Menu panel..........................................................133
Multi-table joins ...................................................232
Page ............................................................132, 133
Page title .............................................................133
Page type ............................................................133
Pagination panel..................................................133
Pagination tag .....................................................171
Passing parameters in a URL .....................229, 234
Passing parameters to custom functions ............237
PushButton tag....................................................179
RangeFilter panel ................................................133
Record tag...........................................................140
Search panel .......................................................133
SearchFilter tag ...................................................186
Selecting a constant value ..................................233
Show table pages................................................220
Sourcing from a table or query............................226
Sourcing from foreign key relationships ..............230
Sourcing from parents record or current table row
.........................................................................225
Sourcing from URL query string parameters ......229
Table panel..........................................................133
Table tag .............................................................153
Table view controls..............................................182
TableStatistic tag.................................................174
Text tag ...............................................................151
Use tag ................................................................189
User control .........................................................133
Properties dialog.......................................121, 131, 680
Properties file
Button element ....................................................697
CategoryFilter element........................................698
ComponentDefinition element.............................687
ComposedOf element .........................................690

z Page 759

ContainedComponent element ........................... 692


Copying ............................................................... 683
Event element ..................................................... 692
EventBindings element ....................................... 691
FieldFilter element .............................................. 700
FieldSort element................................................ 701
FieldStatistic element.......................................... 702
FieldValue element ............................................. 703
Footer element.................................................... 714
Handling Errors ................................................... 684
Header element .................................................. 715
Hierarchical organization .................................... 682
HTML element .................................................... 715
HyperLink element .............................................. 716
Image element .................................................... 716
ImageButton element.......................................... 717
Label element...................................................... 720
LinkButton element ............................................. 718
Literal element .................................................... 720
Menu element ..................................................... 721
Overview ............................................................. 680
Pagination element ............................................. 721
PagingControl element ....................................... 722
Prologue.............................................................. 686
PushButton element............................................ 722
Record element................................................... 724
SearchFilter element........................................... 725
Selection element ............................................... 726
Self element ........................................................ 689
Syntax and vocabulary........................................ 685
Table element ..................................................... 726
TableStatistic element......................................... 727
Text element ....................................................... 728
UserControl element ........................................... 728
XML Declaration ................................................. 686
Properties files
Component binding............................................. 113
Properties Files ........................................................ 683
Overview ............................................................. 681
Protected WithEvents Declarations ......................... 318
Push button display style ......................................... 201
PushButton controls ................................................. 179
PushButton element................................................. 722
PushButton tag
Description of ...................................................... 179
Pass-through attributes....................................... 243
Properties............................................................ 179
Action ................................................................ 210
Button text......................................................... 209
Custom action ................................................... 212
Redirect parameters ......................................... 214

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

Redirect button action .............................................. 210


Redirect button command ........................................ 243
Redirect events ........................................................ 254
Redirect Parameters ................................................ 214
FDV ..................................................................... 215
FK........................................................................ 215
FV........................................................................ 215
FVS ..................................................................... 215
ID215
PK ....................................................................... 215
updatedata .......................................................... 215
Redirect Parameters Types ..................................... 215
Redirect URL............................146, 214, 216, 245, 313
Back .................................................... 214, 245, 313
Close ................................................................... 214
HyperLink tag display style ................................. 146
RedirectAfterEvent method ...................................... 332
RedirectArgument pass-through attribute ................ 245
Redirection ....................................................... 217, 220
RedirectToCustomizedPage method ....................... 332
RedirectToDefaultPage method............................... 333
RedirectToForbiddenPage method .......................... 333
RedirectToLoginPage method ................................. 333
RedirectToSSLPage method ................................... 333
Refresh Data button action ...................................... 210
Refreshing database schemas................................... 77
Refreshing Tables in Your Application....................... 77
Regenerate all user interface pages .......................... 50
Register Directives and Code Generation Tags ...... 294
RegisterClientScript method .................................... 333
Registry
Windows.............................................................. 419
RegularExpressionValidator class ........................... 359
RemoveCurrentRequestFromSessionNavigationHistor
y method ............................................................... 333
Removing **Please Select** from Radio Button List (or
Dropdown List) ..................................................... 610
Removing tables from your application...................... 38
Render method......................................................... 333
Repeater controls............................................. 293, 389
Replacing Controls Generated by Iron Speed Designer
.............................................................................. 483
Reports
Active .................................................................... 20
Crystal Reports example..................................... 659
Database table ...................................................... 28
Request.form value .................................................. 437
requestEncoding ........................................................ 96
Required..................................................................... 41
Required display style .............................................. 198
RequiredFieldValidator class ................................... 360

RequiredFieldValidator presentation control tag ......308


Reset Data button command....................................243
ResetData event.......................................................331
ResetData events .....................................................255
Resource file format .................................................101
Resource files
Editing ...........................................................32, 103
Properties dialog use ..........................................103
Resource Files and the Properties Dialog................103
responseEncoding......................................................96
RESX
Editing resource files.....................................32, 103
Error message file ...............................................100
Resource file format ............................................101
Validation message file .......................................100
RESX file ..................................................273, 280, 284
Returning a Show Table Page with Fresh Data .......220
Reusable Components.............................................459
Reusable Panels ......................................................459
Adding reusable panels to a page.......................460
Building Independent Panels ..............................459
Buttons ................................................................461
Menus..................................................................464
Using record information .....................................469
Role ID field
In roles table....................................................87, 88
Role-based security
Component-level security......................................91
Configuring sign-in and sign-out pages ................88
Configuring simple sign-in authentication .............84
Configuring web pages .........................................90
Creating user accounts in database......................84
Multiple role authentication ...................................82
Overview ...............................................................79
Selecting the Roles table ......................................86
Simple sign-in........................................................80
Single role authentication......................................81
Role-Based Security Overview...................................79
Roles table
Adding role information .........................................88
Description of ........................................................86
Role ID field...........................................................87
Role ID field selection ...........................................88
Selecting for role-based security...........................88
User ID field...........................................................87
User ID field selection ...........................................88
Rows
Alternating ...................................................547, 549
Rows pass-through attribute ....................................248
Run Application command .........................................50
Running and Deploying Your Application.................416

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

Securing Web Pages with Role-Based Security ........79


Security
Machine.config settings.......................................444
Security
Active directory....................................................396
Automatic sign-out...............................................396
Component-level ...................................................91
Configuring user roles ...........................................86
Configuring web pages .................................90, 134
Data transmission encryption..............................396
Enabling simple sign-in security............................84
Firewalls ..............................................................397
LDAP ...................................................................396
Management .......................................................392
Password storage................................................397
Role-based ....................................................79, 134
Roles tables...........................................................88
SQL injection attacks ..........................................398
User roles ..............................................................86
Windows authentication ......................................431
Security
Personal web server ...........................................455
Security
Sign In page appearance ....................................652
Security
Customizing page security enforcement.............652
Security
Customizing application authentication behavior 653
Security
Windows authentication ......................................653
Security And Authentication Coding Examples........652
Selecting a constant value .......................................233
Selecting the Roles Table ..........................................88
Selecting the User Table ............................................85
Selection element .....................................................726
Self element..............................................................689
Send Event Notification To.......................................212
Sending Email from an Application ..........................670
SeparatorTemplate tag
Description of ......................................................163
Server configuration setting......................................406
Server Control Tags .................................................290
Session management...............................................327
Session Management...............................................399
Session state service........................................420, 440
SessionState configuration setting ...................396, 408
Set method ...............................................................320
SetResponseUncacheable method..........................333
setString method ......................................................336
Setting Code Generation Tag Properties .................131
Setting Default Field Display and Data Validation......56

z Page 762

Setting One Field Value when Another Field is


Selected................................................................ 597
Setting the Sort Order for a Table Component ........ 647
Setting the Start Page and Error Pages..................... 54
setValue method ...................................................... 336
setVariable method .................................. 336, 338, 339
Short date format ....................................................... 69
ShortDateValidator class.......................................... 361
ShortDateValidator presentation control tag ............ 310
Show field................................................................... 41
Show label.................................................................. 41
Show Record Button ................................................ 604
Show record pages
Automatically creating......................................... 106
Page templates ................................................... 285
Pre-defined page type........................................... 29
Show Record Pages ................................................ 105
Show system databases ............................................ 37
Show table pages
Automatic page creation options ........................ 105
Automatically creating......................................... 106
Page templates ................................................... 285
Pre-defined page type........................................... 28
Properties............................................................ 220
Show Table Pages ................................................... 105
Sign in page
Menu text selection ............................................... 90
Page folder selection ............................................ 90
Page name selection ............................................ 90
Page templates ................................................... 284
Selecting for role-based security .......................... 90
Setting ................................................................... 55
Storing extra information..................................... 657
Sign out page
Setting ................................................................... 55
SignedOutPageUrl configuration setting.................. 407
Sign-in controls......................................................... 590
Sign-in page
Configuring............................................................ 88
Signing Into Your Application ..................................... 92
SignInPageUrl configuration setting......................... 407
Sign-out page ............................................................. 88
Simple Sign-In Authentication .................................... 80
Single Role Authentication ......................................... 81
SLN file............................................................. 270, 285
Solution file....................................................... 270, 285
Sort by ...................................................................... 250
Sort column ................................................................ 42
Sortable column headings................................ 106, 541
Sorting
Customizing sort order........................................ 603

Database tier .......................................................646


Default sort order.................................................159
Generating automatically ....................................106
Middle tier............................................................646
Secondary sort order...........................................159
Table components...............................................648
Table Components ..............................................647
Sorting Collation Sequences ....................................387
Source Code Control ................................................453
Source folder ............................................................278
Sourcing From a Table or Query..............................226
Sourcing From Foreign Key Relationships...............230
Sourcing From Parents Record or Current Row in a
Table .....................................................................225
Sourcing From URL Query String Parameters.........229
Specify items display style .......................................203
SQL access class files .............................................274
Generated class files...........................................275
SQL injection attacks................................................398
SQL queries
Adding named queries ..........................................74
SQL Query Performance..........................................373
SQL Server Authentication.......................................393
SQL statement generation ...............................108, 372
SQL_Variant Support in Microsoft SQL Server........373
Stand-Alone FieldValue Tag ....................................126
Standard Date and Time Format Strings ...................69
Standard Numeric Format Strings..............................69
Start page
Default.aspx ........................................................270
Setting .............................................................54, 55
Start Tab.....................................................................22
Starting Your Session State Service ........................420
State formatting ..........................................................70
State service
Restarting ............................................................448
Switching between .NET framework 1.0 and 1.1
.................................................................409, 446
Step 1 -- Configuring Role-Based Security ................84
Step 1 Name Your Application ................................30
Step 2 Select a Web Page Style .............................32
Step 2 Select Roles Table.......................................86
Step 3 Connect to a Database Server ....................33
Step 4 -- Configure Web Pages for Role-Based
Security ...................................................................90
Step 4 Select Database Tables...............................35
Step 5 Configure Web Pages..................................39
Step 6 Create a Navigation Menu ...........................45
Step 7 Select a Start Page ......................................45
Step 8 Build Your Application..................................46
Storage Format Options .............................................71

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

Conditionally displaying columns ........................609


Conditionally formatting table text colors ............610
Filtering................................................................630
Sorting .................................................................648
Table controls ...........................................................293
Table Controls and .NET DataGrid Controls............293
Table definition class files ................................274, 275
Table display .. 535, 537, 539, 541, 544, 547, 549, 552,
553, 555
Table element...........................................................726
Table Name Aliases ...................................................76
Table Page Creation Options ...................................105
Table Page Templates .............................................498
Table pagination control ...........................................171
Table panel
Page-level property .............................................133
Panel types..........................................................490
Table pass-through attribute ............................246, 247
Table tag
Data source properties........................................159
DataReaderAlwaysSortBy pass-through attribute
.........................................................................250
DataReaderSortBy pass-through attribute..........250
Default sort order.................................................159
Default table size.................................................159
Description of ......................................................153
Nested Table tags ...............................................156
PageSize pass-through attribute.........................250
Pass-through attributes ...............................250, 251
Properties ............................................................153
Default sort order ..............................................159
Default table size...............................................159
Secondary sort order.........................................159
Record row layout ...............................................154
Secondary sort order...........................................159
Table property properties ....................................159
Table Tag .................................................................153
Table Tag Displaying Tabular Data.......................153
Table Tag Pass-Through Attributes .........................250
Table Tags................................................................153
Table view controls
Always sort by .....................................................250
Default page size.................................................250
Sort by .................................................................250
TableAccess class....................................................340
EnforceAccessRequirements method.................656
TableControlFieldSumLabel presentation control tag
..............................................................................311
TableControlRadioButton presentation control tag ..310
TableControlRepeater presentation control tag .......311
TableName pass-through attribute...........................251

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

Pass-through attributes .......................................249


Properties ............................................................151
Text ...................................................................151
Text displayed .....................................................151
Text pass-through attribute .................................249
TextBox presentation control tag..............................311
TextBoxMaxLengthValidator presentation control tag
..............................................................................312
TextFormat pass-through attribute ...........................248
TextMode pass-through attribute .............................248
The Application Layer (Business Objects) ...............266
The Database Layer .................................................267
The Presentation Layer ............................................266
Third-party controls...................................................475
Creating new FieldValue types ...........................484
CyberAKT ASPNetMenu.....................................476
DataTable object creation ...................................629
Including in layout pages.....................................484
Independent third-party control ...........................475
Inheriting from third-party controls ......................484
Menus..................................................................475
Replacing BaseClass library controls..................483
Tree control .........................................................478
Third-Party Integration Coding Examples ................659
Three-tier architecture
Application layer ..................................................266
Database layer ....................................................267
Overview .............................................................265
Presentation layer ...............................................266
Time outs..................................................................439
Timeout SessionState parameter.....................396, 408
Tool tips ....................................................................210
ToolTip pass-through attribute .................................245
Transaction management.........................................371
Transaction Model ....................................................371
Transact-SQL Stored Procedures for Microsoft SQL
Server ...................................................................375
Tree control ..............................................................478
Tree view ..................................................................478
Trim function...............................................................67
Troubleshooting........................................................390
A potentially dangerous Request.Form value was
detected from the client................................437
Applications wont run .........................................435
Cannot update [tablename]. The data you entered
conflicts ........................................................438
File or assembly name XXX.DLL, or one of its
dependencies...............................................438
HTTP Error 403 Forbidden. You are not
authorized to view this page ........................438

z Page 765

Login failed for user NT AUTHORITY \ NETWORK


SERVICE......................................................... 439
Potentially dangerous XML ............................. 439
Time out........................................................... 439
Unable to authenticate user ............................ 440
Unable to make the session state request ...... 440
Unrecognized attribute validateRequest........ 441
Troubleshooting Your Application ............................ 435
Tutorials and Examples Overview............................ 512
Txt resource key prefix............................................. 102
Types of Code Generation Tags .............................. 123
U.S. phone number field type..................................... 61
U.S. state field type ........................................ 62, 69, 72
U.S. ZIP Code field type............................................. 62
uiCulture ............................................................... 32, 96
Unable to authenticate user.................................. 440
Unable to make the session state request ........... 440
UncheckedValue pass-through attribute.................. 248
United States Phone Numbers, States and ZIP Codes
.............................................................................. 104
Unlinking tables from your application ....................... 38
Unrecognized attribute validateRequest............. 441
Update Data button action ....................................... 210
Update Data button command ................................. 243
updatedata button Redirect Parameters .................. 215
UpdateData event .................................................... 331
UpdateData events .................................................. 255
UpdateData method ................................................. 333
Updating Database Schemas for Your Application.... 77
Updating Existing Records....................................... 621
Updating Existing Records From a Windows
Application ............................................................ 622
Upgrading Iron Speed Designer............................... 103
Uppercase field formatting ......................................... 67
URL
Image file..................................................... 147, 209
Parameter passing.............................. 216, 217, 617
Parameters.......................................................... 126
Parsing XML-encoded record identifiers............. 617
Passing primary key values between pages....... 216
Passing values between pages .......................... 217
URL field type............................................................. 62
URL query strings ............................................ 229, 234
URLValidator class................................................... 361
US state format strings............................................... 70
US State Format Strings ............................................ 70
UsaPhoneNumberValidator class ............................ 362
UsaStateValidator class ........................................... 362
UsaZipCodeValidator class...................................... 362
Use code generation tag .......................... 459, 461, 464
Use tag

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

Using Foreign Keys with Database Views and Named


Queries ................................................................... 66
Using Frames in Generated Web Pages ................. 292
Using Microsoft SQL Server Authentication............. 433
Using Microsoft Visual Design ................................. 452
Using Microsofts Calendar Control to Pick Dates ... 666
Using Multiple FieldValue Tags................................ 127
Using Pass-Through Attributes in Iron Speed Designer
.............................................................................. 239
Using Third-Party Controls....................................... 475
Using Windows Authentication................................. 431
Using XML-Encoded Record Identifiers Passed via
URL....................................................................... 617
UTF-8 encoding.......................................................... 98
Utility programs
CompileApplication ..................................... 270, 422
LoadStoredProcedures ............................... 282, 423
Val resource key prefix............................................. 102
Validate page data ................................................... 210
validateRequest attribute ................................. 409, 437
Validating a Field Value Immediately After Entering
Text....................................................................... 596
Validation
Input fields............................................................. 56
Validation type
Boolean ................................................................. 60
Country.................................................................. 60
Credit card expiration date.................................... 60
Credit card number ............................................... 60
Currency................................................................ 60
Date....................................................................... 61
Decimal number.................................................... 61
Email address ....................................................... 61
File ........................................................................ 61
Floating point number ........................................... 61
Image .................................................................... 61
Number ................................................................. 61
Password .............................................................. 61
Percentage............................................................ 61
String..................................................................... 61
URL ....................................................................... 62
US phone number................................................. 61
US state ................................................................ 62
US ZIP code.......................................................... 62
Very large string.................................................... 62
Validation types
Setting ................................................................... 59
Validator classes ...................................................... 345
VBC compiler ........................................................... 107
VBPROJ file ..................................................... 270, 450
Verifying ASP.NET is Set Up Correctly.................... 444

Verifying the .NET Framework was Installed after


Microsoft IIS ..........................................................443
Very large string field type..........................................62
ViewMultipleRecords Template type ........................492
ViewOneRecord Template type ...............................492
Virtual directories
Creating...............................................418, 424, 436
Creating in Windows 2000 ..................................424
Creating in Windows 2003 ..................................424
Creating in Windows XP .....................................424
Personal web server configuration......................455
Virtual foreign key relationships ...............................231
Virtual foreign keys
Definition of ...........................................................64
Field name.............................................................66
Foreign key name..................................................66
Setting ...................................................................62
Table name ...........................................................66
Virtual primary key option...........................................63
Virtual primary keys
Adding ...................................................................63
Setting ...................................................................62
Virtual record classes ...............................................323
Virtual table access classes .....................................325
VirtualRecord class...................................................338
VirtualTableAccess class .........................................343
Visual Basic
Best uses of in customizing applications ............264
Visual Basic compiler ...............................................107
Visual Basic Project File...........................................450
Visual Studio .NET ...........................................107, 450
Project file format ................................................108
Solution file..................................................270, 285
VBPROJ file ........................................................270
VSDISCO file............................................................270
Web browser compatibility .......................................293
Web.config Configuration File ..................................401
Web.config file ..........................................271, 279, 396
.NET Framework 1.0 ...........................................401
.NET Framework 1.1 ...........................................401
Authentication mode ...........................................655
Windows authentication ......................................655
What is a Layout Page? ...........................................114
Whats in a Page Template? ....................................491
Windows
Opening child windows .......................................585
Windows applications
Updating records .................................................622
Windows authentication .....................................35, 653
Windows Authentication with .NET Impersonation ..394
Windows Authentication with Domain User Account393

z Page 767

Windows Authentication with Local ASPNET Account


.............................................................................. 393
Windows domain groups.......................................... 653
Windows domain users ............................................ 653
Windows registry
Adding your application....................................... 419
Wizards

Database table selection.......................................37


Database view selection .......................................37
Export table ...........................................................30
Table selection ......................................................37
Working with Microsoft Visual Studio .NET ..............450
XML
Properties file ......................................................685

z Page 768

You might also like