aspx:ViewSection
A section of data within a ViewPanel can be standalone. A component can consist of one or two columns, each of which spans two cells: one for a field's label, and one for its value. Only certain components can be included inside the <aspx:ViewSection>. Generally, except for only two additional components, all components that have names starting with "Field" can only be used inside the ViewSection. These two additional components are:
// Reserves a row or column within the ViewSection layout as a blank space.
<aspx:BlankSpace runat='server' />
// Allows custom development or custom components to be added within the ViewSection layout
<aspx:SectionItem runat='server' label='Google Map' required='false'>
<!-- Any HTML Code -->
</aspx:SectionItem>
FieldFileUpload component also cannot be directly included inside a ViewSection.
Below is an example of a View Section for some Contact fields, plus input field for uploading Contact picture:
<aspx:ViewSection runat='server' title='Contact Information' columns='two' labelPosition='top'>
<aspx:Field runat='server' value='{!Model.Firstname}'/>
<aspx:Field runat='server' value='{!Model.Lastname}'/>
<aspx:Field runat='server' value='{!Model.Email}'/>
<aspx:SectionItem runat='server' label='Picture'>
<aspx:FieldFileUpload runat='server' id='contactPicture'/>
</aspx:SectionItem>
</aspx:ViewSection>
Properties
| Property | Description |
|---|
| Title | The title will be shown in the header. |
| Columns | Whether the section will be 1 or 2 columns. Values are "One" and "Two". |
| ShowHeader | Boolean used to display the title or hide it. |
| LabelPosition | Determines where the location of the label will be displayed. Values are "Top" and "Left". |
| TabOrder | LeftToRight or TopDown. |
| Collapsible | Whether the user can collapse the section (collapsing a section hides the section body and only shows the header of the section). |
| Visible | True/false whether the section is visible. |