|
|
|
The Action After Command section specifies which application page should be displayed after the button is clicked and the button command performed. |
|
Options |
Description |
|
URL |
The URL of the page to be displayed when the button is clicked. The URL field has this format: http://<Page URL>?<Parm1>=<Value1>&<Parm2>=<Value2> Here’s an example: http://AcmeOMS/ViewOrders.aspx?OrderID={PK}&Name={FK} The format of the URL parameters (such as PK in the example above) is: [ControlName:][NoUrlEncode:]Type[:Value] When the URL is consumed by a Record control, the associated record is used at run-time to construct the actual URL containing the specified URL Parameters. When consumed by a Table control, the Table control’s selected record is used. The URL may include hard-coded arguments as well as parameterized arguments.
There are a variety of special parameters described in Button Bindings - URL Parameter Properties. The special arguments that may be entered into this field are: |
|
URL Parameters |
the URL parameters, if any, to pass to the page being displayed via the URL. There are a variety of special parameters described in Button Bindings - URL Parameter Properties. |
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 Wizard. Set the Query properties for the table as you normally would. (Note: The Application Wizard 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.
|
|
Any button can be set to redirect to another location, including the same page. |
Step 3: Change the OKButton’s properties as shown below.
|
Tag Property |
Setting |
|
Button Text |
OK |
|
Button Command |
Refresh page |
|
Action After Command |
Go bak to the previous page and refresh its data This causes the next page displayed to be the previous page in the browser’s history. |
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 Wizard. Set the Query properties for the table as you normally would. (Note: The Application Wizard 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. |
Step 3: Fill in the required information as shown below.
|
Tag Property |
Setting |
|
Image file (URL) |
../Images/Everest/Icon_edit.gif |
|
Button Command |
Redirect |
|
URL |
EditEmployeeRecord.aspx?Employees={0} |
|
URL Parameters |
ID |
When the Edit button is clicked, the primary key is passed to the EditEmployeeRecord.aspx via the ID parameter in the URL. EditEmployeeRecord.aspx then knows precisely which record to retrieve from the database and display for editing.