Part V: Customizing Application Code

Part V: Customizing Application Code

Code Customization Tutorial

Application Classes and Methods

Best Practices for Code Customization

Code methods

Where to add customizations?

What events to handle or methods to override?

Do Not Forget the IsPostBack Flag

Referencing Page Controls in Code

Referencing Data Access Functions in Code

Handling Post Back Events

Page code behind example

Record Control code example

Additional Page Lifecycle References

Customizing and Debugging Inside Iron Speed Base Classes

Extending Applications with the Code Customization Wizard

Selecting a Customization to Apply

Substituting Parameters into a Code Template

Applying the Code Customization to your Application

Adding Your Own Code Templates

Customizing Application Security

Implementing Custom User Authentication

Example: Overriding Security at the Page Level

Example: Programmatically Accessing the Currently Logged-in User

Example: Access User Name and Password from Sign In Control

Example: Allow Only Active Users to Login

Example: Encrypting Passwords Before Saving to the Database

Example: Restrict Login after Incorrect Password Used

Sending Email from an Application

Send Password by Email

Emailing the Contents of a Page

If You Have Problems Sending Email...

PDF Report Customization

Customizing PDF Report Configuration Files

Text Substitution Parameters for Titles, Headers, Footers and Columns

PDF Report Alignment Configuration

PDF Report Language and Culture-Based Configuration

Adding, Deleting and Rearranging Columns in PDF Reports

Customizing PDF Report Code

Microsoft Word Report Customization

Customizing Microsoft Word Report Configuration Files

Text Substitution Parameters for Titles, Headers, Footers and Columns

Microsoft Word Report Alignment Configuration

Microsoft Word Report Language and Culture-Based Configuration

Customizing Microsoft Word Report Code

Export to Excel Customization

Customizing the AddColumn Method

Customizing the ExportToExcel Method

Crystal Reports Application Development and Deployment

Creating a Crystal Reports Report File

Adding a Crystal Report to Your Iron Speed Designer Application

Adding Crystal Reports References to Your Project

Opening Crystal Reports PDF Files in Separate Browser Windows

Deploying a Crystal Reports Application

Compilation Errors

Code Customization Examples

Access ASP.NET Controls in Code-Behind Classes

Access Session State Information in Applications

Access Variables in the Data Access Layer

Adding an ASP.NET DataGrid Control to a Web Page

Adding Custom Functions to Your Application

Applying a Special CSS Style Sheet on Selected Pages

Catch Exceptions Raised in Custom Stored Procedures and Triggers

Compare Control Values with CompareValidator

Create a Series of Wizard Pages to Add a Record

Creating a Custom Large List Selector

Customizing the Data Access Layer

Overriding the GetRecordValues Function

Overriding the InsertRecord Function

Customizing the Default Error Message

Disable ValidationSummary and JavaScript for a Page

Disable View State for a Page

Expanding / Collapsing Sections on a Page

Handling Button Events

Modify the RedirectURL Property of a Menu

Opening a Page in a New Browser Window

Redirect to a Page Based on Logged In User

Retrieve Records with Primary, Non-Primary, and Composite Keys

Setting a Field to NULL

Use Data Access Classes in Windows Forms Applications

Validate a Field in the Business Layer