|
Guides (SDK /API) | Technical Reference | BBDN | How-to Documentation |
Code sample project: Custom Pledge Form
Open your Parts project in Visual Studio. This example uses a project called PartsProjectExample.
Add a new custom part (type) to the project called CustomPledgeForm. For information about how to add a custom part (type) to a project, see Add a Custom Part to a Parts Project.
A VB file may appear in an editor. For example, CustomPledgeFormProperties.vb may appear. You will use this file later. But for now, close the VB files for properties and take a look at Solution Explorer.
Open CustomPledgeFormDisplay.ascx for editing in Designer. Right-click CustomPledgeFormDisplay.vb and select View Designer.
Right-clicking...
The ASCX form appears in Design Mode.
Click View > Toolbox. The Toolbox appears.
Add a break after [lblError]. You can place the cursor after the text and press ENTER.
Add a Panel to the form. Adjust the height and width so that there is space to work in.
Change the panel ID to PanelPledgeForm. To adjust the panel properties, you can right-click the panel and select Properties.
The Properties window appears. ID is probably at the bottom.
Changing Panel1 to PanelPledgeForm...
Add a label inside the Panel.
Change the label ID to LabelPledgeForm. Change the text of the label to Make a pledge.
Add a line break. Place the cursor next to the label and press ENTER.
Add an HTML Table.
Delete the right-most column so that there are three rows and two columns.
Adjust the widths of the columns as necessary.
Add a Label to each of the cells in the left column. Change the text to First, Middle, and Last respectively. Change the IDs to LabelFirst, LabelMiddle, and LabelLast.
Add a TextBox to each of the cells in the right column. Change the IDs to TextBoxFirst, TextBoxMiddle, TextBoxLast respectively.
Add a break after the table.
Add a Label for Email address and a break after that. Change the ID for the Label to LabelEmail.
Add a break.
Add a TextBox for email address. Change the ID for the TextBox to TextBoxEmail.
Add a break.
Add a Label for Amount. Change the ID for the Label to LabelAmount.
Add a break.
Add a TextBox for amount. Change the ID for the TextBox to TextBoxAmount.
Add a break.
Add a Button with the text Pledge. Change the ID for the Button to ButtonPledge.