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:  In Design Mode, select the RecordRowEditButton control and set these properties via the Property Sheet as you normally would for any button.

Group

Property

Setting

[Application Generation]

Button actions

Redirect

Button Action Wizard

Redirect

Go to a specific URL

Button Action Wizard

URL

EditEmployee.aspx?Employees={PK}

Button Action Wizard

URL Parameters

Employees={PK}

Appearance

ImageUrl

../Images/icon_edit.gif

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 Actions

Button Actions - Redirect and Send Email Actions

Button Actions - Substitution Variables

Button Tag Properties