.NET - ASP.NET
89.
Explain the validation controls. How many validation controls in ASP.NET 4.0?
Validation controls are responsible to validate the data of an input control. Whenever you provide any input to an application, it performs the validation and displays an error message to user, in case the validation fails.
ASP.NET 4.0 contains the following six types of validation controls:
ASP.NET 4.0 contains the following six types of validation controls:
- CompareValidator - Performs a comparison between the values contained in two controls.
- CustomValidator - Writes your own method to perform extra validation.
- RangeValidator- Checks value according to the range of value.
- RegularExpressionValidator - Ensures that input is according to the specified pattern or not.
- RequiredFieldValidator - Checks either a control is empty or not.
- ValidationSummary - Displays a summary of all validation error in a central location.
90.
What is difference between a Label control and a Literal control?
The Label control's final html code has an HTML tag; whereas, the Literal control's final html code contains only text, which is not surrounded by any HTML tag.
91.
How many types of Cookies are available in ASP.NET?
There are two types of Cookies available in ASP.NET:
The user can set this period manually.
- Session Cookie - Resides on the client machine for a single session until the user does not log out.
- Persistent Cookie - Resides on a user's machine for a period specified for its expiry, such as 10 days, one month, and never.
The user can set this period manually.
92.
What is the use of the Global.asax file?
The Global.asax file executes application-level events and sets application-level variables.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers