ASP.NET Interview questions


Total available count: 47
Subject - Microsoft Technologies
Subsubject - ASP.NET

What is caching?

Caching is a technique to store the page data, parts of the page, items and data objects in memory when first time requested so that same data will be available to other users. It improves application performance. Caching can be done in the following ways,

1. Output cache
2. Fragment cache
3. Data cache
 
1. Output cache: This is page level caching. By using this cache, the whole pagecan be cached into memory.
<%@ OutputCache Duration="60" VaryByParam="none" %>

In the above syntax, the page will be cached for 60 seconds. After that if some one accesses the page again, that page will be cached in to memory.

2. Fragment cache: This is control level cache. In this Fragment cache, a user control can be cached into memory.
<%@ OutputCache Duration="60" VaryByControl="SbHeader" %>

In the above syntax, the SbHeader user control will be cached for 60 seconds. After that if some one accesses that user control through a page again, that user control will be cached in to memory.

3. Data Cache: Caching data from one to page another page with in the application.
Cache.Insert("Users",
dsUsers,newSystem.Web.Caching.CacheDependency(Server.MapPath("sb.xml")) , DateTime.Now.AddSeconds(60),TimeSpan.Zero

 




Next 5 interview question(s)

1
Explain about different states of session?
2
What is session state?
3
What is application state?
4
What is Query String?
5
What is cookie?