Ans :

The Repository Design Pattern in C# Mediates between the domain and the data mapping layers using a collection-like interface for accessing the domain objects.

In other words, we can say that a Repository Design Pattern work as a middle layer between the rest of the application and the data access logic. That means a repository pattern isolates all the data access code from the rest of the application. The advantage of doing so is that, if you need to do any change then you need to do in one place. Another benefit is that testing your controllers becomes easy because the testing framework need not run against the real database access code.  

 

Ans :

1. ItemTemplate

2. AlternatingltemTemplate

3. SeparatorTemplate

4. HeaderTemplate

5. FooterTemplate

 

Ans :

In asp.Net Web config file is specific to a web application where as machine config is specific to a machine or server. There can be multiple web config files into an application where as we can have only one machine config file on a server.

 

Ans :

1. Page_PreInit
2. Page_Init
3. Page_InitComplete
4. Page_PreLoad
5. Page_Load
6. Page_LoadComplete
7. Page_PreRender
8. Render

 

Ans :

In Asp.Net Server.Transfer page processing transfers from one page to the other page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. The clients url history list or current url Server does not update in case of Server.Transfer.

In Asp.Net Response.Redirect is used to redirect the user's browser to another page or site. It performs trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address.

 

 

Ans :

After the Init() and before the Page_Load().

 

Ans :

We can write formatted output using Response.Output.Write().

 

Ans :

"Throw" statement preserves original error stack whereas "throw ex" have the stack trace from their throw point. It is always advised to use "throw" because it provides more accurate error information.

 

Ans :

"is" operator is used to check the compatibility of an object with a given type and it returns the result as Boolean.

"as" operator is used for casting of object to a type or a class.

 

 
Page 1 of 10