This example illustrates how to pass a newly created record ID value (primary key value) from an Add Record page to another page. In this example, the user is redirected to another page when a “Save” button is clicked on an Add Record page. The newly created record ID is passed as a URL parameter to the redirected page.
Step 1: In Design Mode, select the Save button control.
Step 2: In the Property Sheet, set these properties:
Group |
Property |
Setting |
|
Control name |
SaveButton |
[Application Generation] |
Button actions |
Save data on page |
Button Action Wizard |
Redirect |
Go to specific URL |
Button Action Wizard |
URL |
../Employees/EditEmployees.aspx |
Button Action Wizard |
URL parameter |
EmployeeID=[Data Value From: EmployeeRecord] |
Step 3: In the Button Actions dialog, click Add… to add the URL parameter.
URL Parameter |
Setting |
URL parameter name |
EmployeeID |
Data Value From |
EmployeeRecord |
Parameter Value |
Primary key |
Press OK on the URL Parameter dialog.
Step 4: Build and run your application.