Click below for Step by Step and Interview Q & A (dotnetinter) wrote,
Click below for Step by Step and Interview Q & A

Important c# and .NET interview question on object pooling and Gridview events?

Below are some important .NET interview questions which was asked to one of the readers.

1) What is object pooling? (Could you Please give me some example of it  )

Creating and destroyingan object is resource intensive task. So once you create the object  rather than putting it for garbage collection you keep it in memory. So that you save time and resource for creating the object. Now if any request comes for those objects they are pulled straight from the memory rather than recreating it.

One example is of database connection pooling. In the connection string you can provide the pool size

3) Could you please elaborate the events which fired in a gridview with some example?

RowCreated - occurs when each row (including header, footer, and pager) is created. This happens when the control is data bound as well as when it is reconstructed from viewstate on postback.

RowDataBound - Occurs, as the name suggests, when each item is data bound. Again, this happens for data rows as well as header, footer and pager.

RowDeleted - Occurs on a postback triggered by a control meeting the requirements of a delete command for a data item row. This is usually a button with the CommandName of "Delete".

RowCommand - Occurs on a postback triggered by a button in a gridview

.NET  interview question References for further reading:-

You can refer this comprehensive.NET interview question book  published by BPB publications.

13 important ADO.NET interview questions.

Tags: .net and c# interview questions, .net and c# training, csharp interview questions, grid view event, information technology questions, object pooling, programming interview questions

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded