asp.net.ph

ValidationSummary.DisplayMode Property

System.Web.UI.WebControls Namespace   ValidationSummary Class


Sets or retrieves the display mode of the validation summary.

Syntax


Inline <asp:validationsummary displaymode = enumValue ... >
Script ValidationSummary.DisplayMode [ = enumValue ]

Property Value


enumValue String specifying one of the ValidationSummaryDisplayMode enum values.

The property is read/write with a default value of BulletList.

Exceptions


Exception Type Condition
ArgumentException The given display mode was not one of the ValidationSummaryDisplayMode enum 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

The following shows how to declaratively set the DisplayMode property of a ValidationSummary control at design time.

<asp:validationsummary runat = "server" 
   displaymode = "list"
   forecolor = "blue" ... />

The following example demonstrates how to programmatically set the DisplayMode property at run time, based on a selected value. This simple script changes the display mode of the validator summary control named dispSumm when a new option is selected from the dropdownlist named dispMode.

void chgMode ( Object src, EventArgs E ) {
   dispSumm.DisplayMode = ( ValidationSummaryDisplayMode )  dispMode.SelectedIndex;
}

 Show me 

See Also

ValidationSummary Members Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note