posted on Sunday, July 03, 2005 1:23 PM
by
Saravana
ASP.NET 2.0 : GroupingText Property in Panel Control
Panel web server control in ASP.NET 2.0 is coming with a new property "GroupingText", using this property you can set the title for the panel. Panel controls are used to group related controls in a web form. If you set a title for these groupings, it will look better. Using "GroupingText" property you can achieve this.
This feature is implemented using FieldSet and Legend html elements. When the GroupingText property is set in panel control, ASP.NET emits FieldSet and Legend html elements in the response to set the title for the panel.
For example, when you define a panel like this,
<asp:Panel GroupingText="Address" runat=server ID="AddressPanel">
<! -- Child Controls -->
</asp:panel>
HTML output for the panel will be.
<div id="AddressPanel">
<fieldset>
<legend>
Address
</legend>
<!-- Child Controls -->
</fieldset>
</div>