Gets a value indicating whether the current server control's child controls have any saved view-state settings. Gets a value indicating whether the control has attributes set. Gets or sets the color of the message displayed when validation fails. Gets the font properties associated with the Web server control. Gets a list of event handler delegates for the control. Gets or sets the text for the error message displayed in a ValidationSummary control when validation fails. Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client. Gets or sets a value indicating whether themes apply to this control. Gets or sets a value that indicates whether the validation control is enabled. Gets or sets a value indicating whether client-side validation is enabled. Gets or sets the display behavior of the error message in a validation control. Gets a value indicating whether a control is being used on a design surface. Gets a reference to the naming container if the naming container implements IDataKeysControl. Gets a reference to the naming container if the naming container implements IDataItemContainer. Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client. Gets or sets the input control to validate. This property is primarily used by control developers. Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is used primarily by control developers. Gets the style of the Web server control. Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy. Gets the HttpContext object associated with the server control for the current Web request. Gets a character value representing the separator character used in the ClientID property. Gets or sets the algorithm that is used to generate the value of the ClientID property. Gets the control ID for HTML markup that is generated by ASP.NET. Gets a value that indicates whether the server control's child controls have been created. Gets or sets the border width of the Web server control. Gets or sets the border style of the Web server control. Gets or sets the border color of the Web control.
Gets the control that contains this control's data binding. Gets or sets the background color of the Web server control. Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control. Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control. Gets the browser-specific adapter for the control. Gets or sets the access key that allows you to quickly navigate to the Web server control. Initializes a new instance of the RegularExpressionValidator class.
Accessibilityįor information about how to configure this control so that it generates markup that conforms to accessibility standards, see Accessibility in Visual Studio and ASP.NET and ASP.NET Controls and Accessibility. For more information on regular expressions, see.
For more information about using the UpdatePanel control for partial-page updates, see Partial-Page Rendering Overview.įor additional information about validation controls, see BaseValidator. When you use the RegularExpressionValidator control inside an UpdatePanel control, make sure that the validator control and the control it is associated with are in the same panel. This type of validation allows you to check for predictable sequences of characters, such as those in email addresses, telephone numbers, and postal codes.
The RegularExpressionValidator control checks whether the value of an input control matches a pattern defined by a regular expression. Sub ValidateBtn_Click(sender As Object, e As EventArgs) Void ValidateBtn_Click(Object sender, EventArgs e) For more information, see Script Exploits Overview. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. If you want to understand how to get it set up, know how to analyse the data, and dig into all of the features, check out this series.This example has a text box that accepts user input, which is a potential security threat.