System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Web.UI.WebControls.BaseValidator System.Web.UI.ToolboxData("<{0}:RequiredFieldValidator runat="server" ErrorMessage="RequiredFieldValidator"></{0}:RequiredFieldValidator>")

Use this control to make an input control a required field. The input control fails validation if its value does not change from the property upon losing focus.

Multiple validators can be associated with the same input control. For example, a can be used to ensure input to a control, while at the same time a can be used to ensure that the input is within a specified data range.

When you use the control inside an control, make sure that the validator control and the control it is associated with are in the same panel. For more information about using the control for partial-page updates, see Partial-Page Rendering Overview.

For additional information on validation controls, see .

## Accessibility

For information about how to configure this control so that it generates markup that conforms to accessibility standards, see Accessibility in Visual Studio 2010 and ASP.NET 4 and ASP.NET Controls and Accessibility.

Makes the associated input control a required field.

- Constructor

  Use this constructor to create and initialize a new instance of the class.

  Initializes a new instance of class.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` a To be added

  Adds the HTML attributes and styles that need to be rendered for the control to the specified object.

  1.0.5000.0
  2.0.0.0
- Method
  System.Boolean To be added

  Called during the validation stage when ASP.NET processes a Web Form.

  true if the value in the input control is valid; otherwise, false.

  1.0.5000.0
  2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  Use this property to specify the initial value of the input control.

  Validation fails only if the value of the associated input control matches this upon losing focus.

  The strings in both the property and the input control are trimmed to remove extra spaces before and after the string before validation is performed.

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

  Gets or sets the initial value of the associated input control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue("")
  System.Web.UI.Themeable(false)