System.Web.UI.WebControls.BaseValidator.SetFocusOnError Property

Gets or sets a value that indicates whether focus is set to the control specified by the BaseValidator.ControlToValidate property when validation fails.

Syntax

[System.ComponentModel.DefaultValue(false)]
[System.Web.UI.Themeable(false)]
public bool SetFocusOnError { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the BaseValidator.SetFocusOnError property to specify whether focus is automatically set to the control specified by the BaseValidator.ControlToValidate property when this validation control fails. This allows the user to quickly update the appropriate control.

If multiple validation controls fail and this property is set to true, the control specified in the BaseValidator.ControlToValidate property for the first validation control receives focus.

This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0