Example: Enabling an Edit Record Icon in a Table Control using Page Redirection

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.

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.

Step 1:  Create a page using the Application Wizard, e.g., ShowCategoriesTablePage.aspx.

Step 2:  Open the Properties dialog, select the RecordRowEditButton control and set these properties as you normally would for any button.

Tab

Property

Setting

Display

Image file (URL)

../Images/icon_edit.gif

Bindings

Action

Redirect

Bindings

Redirect

Go to a specific URL

Bindings

URL

EditEmployee.aspx?Employees={PK}

Bindings

URL Parameters

Employees={PK}

Step 3:  Build and run your application.

When the Edit button is clicked, the primary key is passed to the EditEmployee.aspx via the ID parameter in the URL.  EditEmployee.aspx then knows precisely which record to retrieve from the database and display for editing.

See Also

Button Actions and Properties

Button Display Properties

Button Binding Properties

Button Bindings - Redirect and Send Email Actions

Button Bindings - Substitution Variables

Button Tag Pass-Through Attributes