Question - Define Validation Control in ASP.NET.
Answer - The validation control is
used to implement page level validity of data entered in the server controls.
This check is done before the page is posted back to the server thus avoid
round trip to the server. If data does not pass validation, it will display an
error message to the user.
Question - What are the validation types supported by
ASP.NET?
Answer - Following are the validation
types in ASP.NET:
-
The RequiredFieldValidator control forces the input control
a required field.
-
The CompareValidator control is used to compare values of
the two input fields.
-
The CustomValidator control allows you to write a method to
handle the validation of the value entered.
-
The RangeValidator control is used to check that the user
enters an input value that falls between two values. It is possible to check
ranges within numbers, dates, and characters.
-
The RegularExpressionValidator control ensures an input
value matches a specified pattern.
-
The ValidationSummary control is used to display a summary
of all validation errors occurred in a Web page.
Question - Describe the steps to use Validation
Control.
Answer -
-
Draw a validation control on a Web form
-
Set the ControlToValidate property to the control
you want to validate.
-
Specify the ControlToCompare property with
CompareValidator control.
-
Specify error message to the validation control’s
ErrorMessage property.
-
Specify error message to the validation control’s
Text property if you want to display a message other than the message in the
ErrorMessage property.
-
Draw a ValidationSummary control on the Web form to
display the error messages from the validation controls in one place.
Define state management in ASP.NET. | Define Client-side
state management and Server-side state management.
What is XML Web Server? | Describe the Components that help locate and consume
XML Web Service. | Describe the process of communication between Client and Web
Service. | What are the components published while deploying of Web Service? |
Describe .disco file. | Describe the step to be followed to access web service
by client.
|