Interview question For L&T Infotech

Recently attended one telephonic interview for technical round in L&T. The job profile was that for SSRS developer with Sql server and ASP.Net knowledge as well.But the interview was all about OOPs concept. The interviewer even didn't asked me anything about project experience.Here are the questions and elaborate explaination of the answers.

1. Explain ASP.Net page lifecycle.
You can refer the article
I found this article hands-on and very useful.

2. In which event the master page controls are loaded?
Master page is also a page itself. So it follows the page lifecycle stage. However a master page has less number of events than a normal page.
Only the following events are triggered, and in this order:
The master page events are fired after the page events in the same sequence.

3. In which event the HTML is loaded?
The HTML contents are loaded in the Render stage of a page lifecycle. In the Pre-Render event.

4. Why do we use master page in our application?
We create master page to give a uniform structure to our application. Suppose we have some header or Menu bar which should be there in all the pages of the application there we can use a Master page that will help in creating uniformity and avoiding any coding redundancy.

5. How do we access the master page in our page?
To access the master page functionalities in our page we have to add the 'MasterPageFile' property in the page directive.
<%@ Page Language="C#" MasterPageFile="~/MasterPages/Master1.master" Title="Content Page"%>
Then we have to add a 'ContentPlaceholder' control to our page to access the master page controls.

6. Can an application have more than one master page?
Yes we can have more than one master page in our application.But a page cannot access more than one master page at one point. However one master page can access another master page i.e. Nested master pages can be created.

7. What is polymorphism?Explain the types of polymorphism.
Literally "Poly" means Many and "Morph" means form.So, in Dotnet it signifies many forms of the same function/methos or operator.
There are two types of polymorphism i.e. Compile Time Polymorphism and RunTime Polymorphism.Example of Compile Time Polymorphism is Method Overloading and Operator overloading. Example of Run Time Polymorphism is Method overriding.

8. Difference between Method overloading and Method overridding.
Method Overloading
Method overloading means same method names with different signatures i.e. different parameters.The number of parameters or the datatype of the parameters may vary.
Method Overridding
In method overriding we can override a method in base class by creating same method in derived class using "virtual &override" keywords for inheritance.
In base class if we have to declare methods with virtual keyword and we can override those methods in derived class using override keyword.

9. Difference between abstract class and interface.With example.
You can refer to my previous article in the below link:

10. How we do exception handling in ASP.Net?
We use Try..Catch block to do Exception handling in dotnet.

11. If we write 2 error messages in a catch block.First, a generalized one and second, a math expression.Which one will get executed-1st, 2nd or both.
The first one will get executed because when the compiler comes across the generalized one first, then all the exceptions are included in the generalized exception statement so it executes it and come out.
So, we should always Catch the more specific exceptions before the less specific ones .i.e the generalized exceptions.

12. If the Exception handling contains only Try and Finally block and no catch block, will it get executed?
Yes, it will get executed. If aTry statement does not contain at least one Catch block, it must contain a Finally block. The Finally... statement in a block of code will be executed, even though the Exception is not thrown or handled here. Any Finally... block between the throwing of an Exception and the handling of an Exception will always be executed.

13. What is the use of "Using" keyword in
The most common use of Using keyword is adding assembly reference to code behind page.
But other than this, Using keyword can be used for exception handling and disposal of unwanted resource. A Using block can be used same as a Try...Finally block. Because of this, the Using block guarantees disposal of the resources, no matter how you exit the block.
Using resource As New resourceType
' Insert code to work with resource.
End Using

14. What is State Management? What are the types of state management?
You can refer to my previous article in the below link:

15. What do you mean by View State?
You can refer to my previous article in the below link:

16. Difference between ViewState and Hidden Field?
Viewstate is a client side management where the data is stored between postbacks.
There is no extra data encryption and decrytion concept.
The data values of the viewstate controls are visible on page on enabling the viewstate.
Hidden Field
Hidden Field is server control which stores some data so while data retrival it hits the server.
Hidden field is control.So as compared to viewstate it cannot store the data for a whole page.It stores less amount of data as compared to a viewstate.
The hidden field uses the serialization and deserialization mechanism for storing and retriving data.
Hidden field stores a single variable in its value property and must be explicitly added it to the page.

17. What is Web Services?
A web service is a platform independent web application which is basically a class consisting of web methods that could be used by other applications. Any application with any language can utilise the methods of a web service.

18. Why do we use JavaScript in our application?
We use javascript for client side scripting in our application. Suppose we need some popup window as some alert or some confirmation message.We use javascript for client-side security also.

19. What is SVN?
SVN stands for source version control. It is used when we want different persons to work on same page without interfering into each other's code resulting in loss of data.Eack person can check out a copy of the page into their local machine, edit it and check-in back.

1. What is the difference between Primary Key and Unique Key?
I. A table can have only one primary key column but it can have more than one unique key columns.But the combination of the columns must be having a unique value.
II. Primary key cannot have a NULL value but an Unique Key column can have only one NULL value.
III. By default,primary key creates a clustered Index whereas unique key creates a non-clustered Index.

1. What do you mean by RDL?
2. What is a dataset?
3. What is a drill down report?
For SSRS answers you can refer to my article from the below link:


Author: sridhar thota24 Apr 2015 Member Level: Gold   Points : 5

11. If we write 2 error messages in a catch
block.First, a generalized one and second, a math
expression.Which one will get executed-1st, 2nd
or both.
A)If we write first general exception, then it will not allow us to write second exception class.
Error will show"previous catch already catches all exceptions".
Only one general exception class serves all exceptions.

12. If the Exception handling contains only Try
and Finally block and no catch block, will it get
A) Try block logic will be executed , if exception occurs then there is no catch block to handle.
so exception will be thrown.
How ever finally block will execute independent of exception.

13. What is the use of "Using" keyword in
A) Using statement loads the last specified namespace.
using system.Collections.Generc;

DNS Member.

Author: sridhar thota24 Apr 2015 Member Level: Gold   Points : 4

4.Why do we use masterpage in our application?
A) Master page is a layout or template for all
webpages in a website. we can have one master
page for website or we can have nested master
Where content page is unique which is present
inside the master page.
If you want to change the design or image or
menu options for layout, you no need to do for all
web pages separately instead just modify in
master page which will effect all pages in a
This is the main use of masterpage.

DNS Member.

Author: sridhar thota25 Apr 2015 Member Level: Gold   Points : 3

17.What is webservice?
A)Webservice is a logic that is shared by different applications with in a network.
It is a class which is managed by the webserver.

Webservice can be accessed by application developed in any programming language and running on any platform.

Webservice uses xml serialization, so webservices are also called as xml webservices.

DNS Member.

  • 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: