Skip to main content

Top 100 Dot Net Interview Questions - Part 7

61. What do you understand by aggregate dependency?

Aggregate dependency allows multiple dependencies to be aggregated for content that depends on more than one resource. In such type of dependency, you need to depend on the sum of all the defined dependencies to remove a data item from the cache.

62. How can you ensure that no one has tampered with ViewState in a Web page?

To ensure that no one has tampered with ViewState in a Web page, set the EnableViewStateMac property to True.

63. What is the difference between adding items into cache through the Add() method and through theInsert() method?

Both methods work in a similar way except that the Cache.Add() function returns an object that represents the item you added in the cache. The Cache.Insert() function can replace an existing item in the cache, which is not possible using the Cache.Add() method.

64. Explain the cookie less session and its working.

ASP.NET manages the session state in the same process that processes the request and does not create a cookie. It is known as a cookie less session. If cookies are not available, a session is tracked by adding a session identifier to the URL. The cookie less session is enabled using the following code snippet:<sessionState cookieless="true" />

65. What is a round trip?

The trip of a Web page from the client to the server and then back to the client is known as a round trip.

66. What are the major built-in objects in ASP.NET?

The major built-in objects in ASP.NET are as follows:

  • Application
  • Request
  • Response
  • Server
  • Session
  • Context
  • Trace

67. Where should the data validations be performed-at the client side or at the server side and why?

Data validations should be done primarily at the client side and the server-side validation should be avoided because it makes server task overloaded. If the client-side validation is not available, you can use server-side validation. When a user sends a request to the server, the validation controls are invoked to check the user input one by one.

68. Why do we need nested master pages in a Web site?

When we have several hierarchical levels in a Web site, then we use nested master pages in the Web site.

69. How can you dynamically add user controls to a page?

User controls can be dynamically loaded by adding a Web User Control page in the application and adding the control on this page.

70. What is the appSettings Section in the web.config file?

The web.config file sets the configuration for a Web project. The appSettings block in configuration file sets the user-defined values for the whole application.

For example, in the following code snippet, the specified ConnectionString section is used throughout the project for database connection:

<configuration>
<appSettings>
<add key="ConnectionString" value="server=indiabixserver; pwd=dbpassword; database=indiabix" />
</appSettings>
...

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