Friday, March 23, 2012

Custom Form Template: Adding an “Order Form Template” User Control

Let’s rearrange the Order Form page to make it easier for the end user to interact with the data. To do this, we will need to add a custom “Order Form Template” user control to the page.

In the Designer, right-click on OrderForm / c100 node, and press New Control.

'New Control' option in Code On Time Project Explorer

The new control requires you to select an existing user control. Instead of pressing (select), click on the New icon to the right of the field.

'New User Control' button on the 'New Control' page

Give this user control the name of:

OrderFormTemplate

New User Control 'OrderFormTemplate'

Press OK to create the User Control. You will return to the New Control page.

'OrderFormTemplate' control for a Custom Form Template

Leave the rest of the settings as default, and press OK to insert the control into the page container Order Form / c100.

Press generate to regenerate the application.

The new user control will be generated if it doesn’t exist. If the generator detects that the file exists, then it will not be overwritten – any changes to the file will be preserved between code generation sessions.

No comments:

You can find more about Code OnTime Generator, Data Aquarium Framework, and other great products here.


© 2010 Code OnTime LLC. Intelligent code generation software for ASP.NET. Visit us at http://codeontime.com