ValidationSummary.DisplayMode Property
Gets or sets the display mode of the validation summary.
[Visual Basic] Public Property DisplayMode As ValidationSummaryDisplayMode [C#] public ValidationSummaryDisplayMode DisplayMode {get; set;} [C++] public: __property ValidationSummaryDisplayMode get_DisplayMode(); public: __property void set_DisplayMode(ValidationSummaryDisplayMode); [JScript] public function get DisplayMode() : ValidationSummaryDisplayMode; public function set DisplayMode(ValidationSummaryDisplayMode);
Property Value
One of the ValidationSummaryDisplayMode values. The default is BulletList.
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentException | The display mode is not one of the ValidationSummaryDisplayMode values. |
Remarks
Use this property to specify the display format of a ValidationSummary control. The summary may be displayed as a list, as a bulleted list, or as a single paragraph.
Example
[Visual Basic, C#] The following example demonstrates how to set the DisplayMode property to display a bulleted list.
[Visual Basic] <asp:ValidationSummary id="valSum" DisplayMode="BulletList" HeaderText="You must enter a value in the following fields:" Font-Name="verdana" Font-Size="12" runat="server"/> [C#] <asp:ValidationSummary id="valSum" DisplayMode="BulletList" HeaderText="You must enter a value in the following fields:" Font-Name="verdana" Font-Size="12" runat="server"/>
[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
ValidationSummary Class | ValidationSummary Members | System.Web.UI.WebControls Namespace | ValidationSummaryDisplayMode