Skip to main content

Top 100 Dot Net Interview Questions - Part 9

81. Which namespaces are necessary to create a localized application?

The System.Globalization and System.Resources namespaces are essential to develop a localized application.

82. What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control?

You can select more than one HtmlInputCheckBox control from a group of HtmlInputCheckBox controls; whereas, you can select only a single HtmllnputRadioButton control from a group ofHtmlInputRadioButton controls.

83. What is the difference between HTML and Web server controls?

HTML controls are client-side controls; therefore, all the validations for HTML controls are performed at the client side. On the other hand, Web server controls are server-side controls; therefore, all the validations for Web server controls are performed at the server side.

84. Explain the AdRotator Control.

The AdRotator is an ASP.NET control that is used to provide advertisements to Web pages. The AdRotatorcontrol associates with one or many advertisements, which randomly displays one by one at a time when the Web page is refreshed. The AdRotator control advertisements are associated with links; therefore, when you click on an advertisement, it redirects you to other pages.

The AdRotator control is associated with a data source, which is normally an xml file or a database table. A data source contains all the information, such as advertisement graphics reference, link, and alternate text. Therefore, when you use the AdRotator control, you should first create a data source and then associate it with the AdRotator control.

85. What do you understand by the culture?

The culture denotes a combination of a language and optionally a region or a country. The contents of a Web page of a multilingual Web site are changed according to the culture defined in the operating system of the user accessing the Web page.

86. What is the difference between absolute expiration and sliding-time expiration?

The absolute expiration expires a cached item after the provided expiration time. The sliding time does not expire the cached items because it increments the specified time.

87. What is the code-behind feature in ASP.NET?

The code-behind feature of ASP.NET enables you to divide an ASP.NET page into two files - one consisting of the presentation data, and the second, which is also called the code-behind file, consisting of all the business logic. The presentation data contains the interface elements, such as HTML controls and Web server controls, and the code-behind contains the event-handling process to handle the events that are fired by these controls. The file that contains the presentation data has the .aspx extension. The code behind file has either the .cs extension (if you are using the programming language C#) or the .vb (if you are using the programming language Visual Basic .NET) extension.

88. How can you check if all the validation controls on a Web page are valid and proper?

You can determine that all the validation controls on a Web page are properly working by writing code in the source file of the Web page using a scripting language, such as VBScript or JavaScript. To do this task, you have to loop across validators collection of pages and check the IsValid property of each validation control on the Web page to check whether or not the validation test is successful.

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:

  • 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.

Comments

Popular posts from this blog

Top 100 Dot Net Interview Questions - Part 1

1. What is ASP? Active Server Pages (ASP), also known as Classic ASP, is a Microsoft's server-side technology, which helps in creating dynamic and user-friendly Web pages. It uses different scripting languages to create dynamic Web pages, which can be run on any type of browser. The Web pages are built by using either VBScript or JavaScript and these Web pages have access to the same services as Windows application, including ADO (ActiveX Data Objects) for database access, SMTP (Simple Mail Transfer Protocol) for e-mail, and the entire COM (Component Object Model) structure used in the Windows environment. ASP is implemented through a dynamic-link library (asp.dll) that is called by the IIS server when a Web page is requested from the server. 2. What is ASP.NET? ASP.NET is a specification developed by Micro

Top 100 Dot Net Interview Questions - Part 3

21. What is Query String? What are its advantages and limitations? The Query String helps in sending the page information to the server. The Query String has the following advantages: Every browser works with Query Strings. It does not require server resources and so does not exert any kind of burden on the server. The following are the limitations of Query String: Information must be within the limit because URL does not support many characters. Information is clearly visible to the user, which leads to security threats. 22. What is actually returned from