Interview Question Cognizant (Market Rx) - Gurgaon, SQL Server

Explain the Page Life Cycle
What is bubble event and how it work's
How to use scalar, in case of multiple tables what will be the output.
If Master Page is attached with a child, which event's will be fired first. Explain the execution of page.
How to get the source of calling page
Difference Between Response.redirect & Response.Transfer
Explain the use of Request.UrlReferrer
Difference Between Abstract Class and Interface
Difference Between HttpWebRequest and Response.write
Explain Early binding.
What is UserControl, difference between usercontrol and custom control



Author: banu27 May 2011 Member Level: Gold   Points : 1

Explain the Page Life Cycle

Control Events

What is UserControl,
difference between usercontrol and custom control

User controls are reusable controls, similar to web pages. They cannot be accessed directly.

Web User Control:
1) Easy to Create.
2) It Can be used inside the same Application.(To use it in other application we need to add it to that project.)
3) It Can take advantage of Caching Technique.

Web Server Control:
1) Bit tuff to create as compare to User Control.
2) Easy to use.
3) Can be added to ToolBox.

Difference Between Response.redirect & Response.Transfer

Server.Transfer transfers page processing from one page directly to the next 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.Server.Transfer does not update the clients url history list or current url.
Response.Redirect is used toredirect the user's browser to another page or site. This performs a 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.

Difference Between Abstract Class and Interface

• A class can implement any number of interfaces but a subclass can at most use only one abstract class.
• An abstract class can have non-abstract Methods (concrete methods) while in case of Interface all the methods have to be abstract.
• An abstract class can declare or use any variables while an interface is not allowed to do so.
An abstract class can have constructor declaration while an interface cannot do so.
An abstract Class is allowed to have all access modifiers for all of its member declaration while in interface we can not declare any access modifier (including public) as all the members of interface are implicitly public.

What is bubble event

Server Controls like DataGrid,DataGridView , DataList etc have other controls inside them.
Example an DataGridView can have an TextBox or an button inside it.
These Child Controls can not raize events by themselves,but they pass the event to the parent control (DataGridView), which is passed to the page as "ItemCommand" event.
This process is known as EventBubling

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: