<Panel>

The Panel tag is a container tag that holds other tags and HTML. It can be used just as a container, making it easy to set the container's colors and borders. Primarily, though, it is used to show/hide parts of the form based on what role the current user is in. So, for instance, you can include controls that will only be available to administrators or editors or registered users, etc.

Syntax

<Panel 
    AccessKey="string" 
    BackColor="color name|#dddddd" 
    BackImageUrl="uri" 
    BorderColor="color name|#dddddd" 
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| 
                 Inset|Outset" 
    BorderWidth="size" 
    CssClass="string" 
    DefaultButton="string"
    Font-Bold="True|False" 
    Font-Italic="True|False" 
    Font-Names="string" 
    Font-Overline="True|False" 
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| 
               Large|X-Large|XX-Large" 
    Font-Strikeout="True|False" 
    Font-Underline="True|False" 
    ForeColor="color name|#dddddd" 
    Height="size" 
    HorizontalAlign="NotSet|Left|Center|Right|Justify" 
    ID="string" 
    ScrollBars="None|Horizontal|Vertical|Both|Auto" 
    ShowRoles="Role1Name,Role2Name"
    Style="string" 
    Visible="True|False" 
    Width="size" 
    Wrap="True|False"> 

      ...HTML, Text, and Control Tags...
 
</Panel>   
 

Remarks

This tag can be used solely as a container (much like the DIV tag in HTML). More often, it will be used to only show portions of a form to members of particular roles. To do this, use the ShowRoles attribute.

Back to top

Example

<addform>
  ...
  <Panel ShowRoles="Editor">
    <checkbox id="chkApproved" datafield="Approved" datatype="boolean" text="Approved?" />
  </Panel>

  <table>
    <tr>
      <td>
        <label for="txtFirstName" text="First Name" />
        <textbox id="txtFirstName" datafield="FirstName" datatype="string" />
      </td>
    </tr>
    <tr>
      <td>
        <label for="txtLastName" text="Last Name" />
        <textbox id="txtLastName" datafield="LastName" datatype="string" />
       </td>
    </tr>
    <tr>
      <td colspan="2">
        <addbutton text="Add"/>&nbsp;<cancelbutton text="Cancel"/>
      </td>
    </tr>
  </table>
</addform>
Back to top