Export (0) Print
Expand All
Expand Minimize

ValidationSummaryDisplayMode Enumeration

Specifies the validation summary display mode used by the ValidationSummary control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public enum ValidationSummaryDisplayMode
public enum ValidationSummaryDisplayMode
public enum ValidationSummaryDisplayMode

 Member nameDescription
BulletListValidation summary displayed in a bulleted list. 
ListValidation summary displayed in a list. 
SingleParagraphValidation summary displayed in a single paragraph. 

The ValidationSummaryDisplayMode enumeration represents the different display formats of a ValidationSummary control.

The following example demonstrates how to specify the display mode for a ValidationSummary control.


<%@ Page Language="C#"%>

<html>
  <body>
    <form runat="server">
    
      Name:<br/>
      <asp:textbox id="NameTextBox"
        runat="server"/>
        
      <asp:requiredfieldvalidator id="NameTextBoxRequiredValidator"
        controltovalidate="NameTextBox"
        errormessage="Name field."
        text="Please enter your name"
        runat="server"/>     
        
      <br/>  
      
      City:<br/>
      <asp:textbox id="CityTextBox"
        runat="server"/>
        
      <asp:requiredfieldvalidator id="CityTextBoxRequiredValidator"
        controltovalidate="CityTextBox"
        errormessage="City field."
        text="Please enter the city."
        runat="server"/> 
        
      <br/>
      
      <asp:Button id="SubmitButton"
        text="Submit"
        runat="server"/>
      
      <hr/>
      
      <asp:ValidationSummary 
        id="valSum" 
        displaymode="BulletList" 
        headertext="You must enter a value in the following fields:"
        runat="server"/>
    
    </form>
  </body>
</html>
 

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft