Friday 6 June 2014

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.

What is State Management? How many ways are there to maintain a state in .NET?

State management is used to store information requests. The state management is used to trace the information or data that affect the state of the applications.

There are two ways to maintain a state in .NET, Client-Based state management and Server-Based state management.

The following techniques can be used to implement the Client-Based state management:

  • View State
  • Hidden Fields
  • Cookies
  • Query Strings
  • Control State

The following techniques can be used to implement Server-Based state management:
  • Application State
  • Session State
  • Profile Properties

In which database is the information, such as membership, role management, profile, and Web parts personalization, stored?

The aspnetdb database stores all information.

How can you identify that the page is PostBack?

The Page object uses the IsPostBack property to check whether the page is posted back or not. If the page is postback, this property is set to true.

How can you enable impersonation in the web.config file?

To enable impersonation in the web.confing file, you need to include the <identity> element in the web.config file and set the impersonate attribute to true as shown in the following code snippet:
<identity impersonate = "true" />

What does the .WebPart file do?

The .WebPart file explains the settings of a Web Parts control that can be included to a specified zone on a Web page.

What are Custom User Controls in ASP.NET?

The custom user controls are the controls that are defined by developers. These controls are a mixture of custom behavior and predefined behavior. These controls work similar to other Web server controls.

What is a Cookie? Where is it used in ASP.NET?

Cookie is a lightweight executable program, which the server posts to client machines. Cookies store the identity of a user at the first visit of the Web site and validate them later on the next visits for their authenticity. The values of a cookie can be transferred between the user's request and the server's response.

Which method is used to post a Web page to another Web page?

The Respose.Redirect method is used to post a page to another page, as shown in the following code snippet: Response.Redirect("DestinationPageName.aspx");

How can you assign page specific attributes in an ASP.NET application?

The @Page directive is responsible for this.