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

Introducing Viroprotek

Introducing Viroprotek Advanced Hand Sanitizer & Disinfectant from Asian Paints @ Cheaper Price, contact me at 9884040933

Apple 'iWatch' is Jony Ive's pet project, could release this year

Wearable computing is being seen as one of the next-big-things in the future of technology, whether it's Google's Glass or companies like Samsung and Apple racing to pitch their next smart watch. Independent watch-maker  Pebble  may have taken the lead, but Apple isn't too far behind. A new Bloomberg report  says that Apple's so-called iWatch is expected to release this year. The report mentions that the project is currently being fuelled by the efforts of a 100 engineers being led by Apple design chief Jony Ive himself. While the bit about 100 engineers seems excessive for a company that is known for small teams that work on the secret projects, the report does mention that Ive, who has a fetish for high-end watches, went so far as to order "boxes" of Nike sports watches for his team to study a few years ago. The business portal points out that the iWatch may end up being more profitable than Apple's other rumoured new television business. Even though ...