Regular expression for validating name in asp net

by  |  27-Oct-2019 21:03

alphanumeric values with space character, thus unless a special character key has been specified to be excluded it won’t be accepted.

regular expression for validating name in asp net-24

You can add form validation routines to your server-side code, or you can add the validation routines to your client-side code.

The advantage of writing validation logic in client-side code is that you can provide instant feedback to your users.

The following HTML Markup consists of a Text Box, a Button and an HTML SPAN. For example:- - Minimum 8 characters at least 1 Alphabet and 1 Number - Minimum 8 characters at least 1 Alphabet, 1 Number and 1 Special Character - Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet and 1 Number - Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character - Minimum 8 and Maximum 10 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to make use of Sql Data Source Filter Expression with Filter Parameters to filter records in ASP. In order to filter the Grid View records, I am making use of a Drop Down List control that will be used to select the filter records in Grid View.

To the Button a j Query click event handler is attached thus when the button is clicked, the Text Box text is validated against the Regular Expression (Regex) and if it contains character other than Alphabets or Space then an error message is displayed. Net Regular Expression Validator samples to validate Minimum and Maximum text Length and also different configurations like Alphanumeric with special characters, Alphanumeric, Alpha and Numeric configurations. The Drop Down List will be specified as Control Parameter in the Sql Data Source Filter Parameters, so that when a Value is selected in the Drop Down List it will filter the Grid View Records.

For example, a ZIP code must consist of five digits, and a last name must start with a capital letter.

Community Discussion