This documentation is archived and is not being maintained.

ValidationSummary.HeaderText Property

Gets or sets the header text displayed at the top of the summary.

[Visual Basic]
Public Property HeaderText As String
[C#]
public string HeaderText {get; set;}
[C++]
public: __property String* get_HeaderText();
public: __property void set_HeaderText(String*);
[JScript]
public function get HeaderText() : String;
public function set HeaderText(String);

Property Value

The header text displayed at the top of the summary. The default is String.Empty.

Remarks

Use this property to display a title for the ValidationSummary control.

The HeaderText is not HTML encoded. Therefore, HTML tags can be included in the HeaderText.

Example

[Visual Basic, C#] The following example demonstrates how to use the HeaderText property to display a title for the ValidationSummary control.

[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 Language Filter 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

Show: