Best ASP.NET Interview Questions

1) Tell me the diff between Interface and Abstraction

Ans) in the interface all methods must be abstract; in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes

1) both can’t create instance of object.
2) abstraction is framework of all classess.interface also framework of all classes.
3) Abstractions having mustoverride method that declare in abstract class and actually implement in derived class. Other method override in derived class is depend on u.
4)but in interface class all declare method’s u compulsory to override in derived class.
5) Only one abstract class use in derived class.

2) What is serialization?

Ans) Serialization is the process of converting objects into stream of bytes

3) What is reflection?

Reflection is the mechanism of access the metadata of the Assembly.
We can invoke the class members at runtime using Reflection.

And also we could see the classes and methods at runtime

You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object

Reflection is a process of retrieving metadata information about the types, attributes during runtime.

4) How to error handlings in stored procedure give example urgent?

USE tempdb
@Column2 int =NULL
INSERT NonFatal VALUES (@Column2)
IF @@ERROR <>0
PRINT ‘Error Occured’

5) What is the Difference between a View and Stored Procedure?

View doesn’t have a input and output parameters
Stored Proc have input and output parameters
you use view in a query
you cant use stored proc in a query

6)How many types of joins in sqlserver?

You use INNER JOIN to return all rows from both tables where there is a match. ie. in the resulting table all the rows and colums will have values.
In OUTER JOIN the resulting table may have empty colums. Outer join may be either LEFT or RIGHT
LEFT OUTER JOIN returns all the rows from the first table, even if there are no matches in the second table.
RIGHT OUTER JOIN returns all the rows from the second table, even if there are no matches in the first table.

Full Outer Join—For retrieving all the columns from both the tables irrespective of column match

7) What is difference between char and varchar?

Ans) The char is a fixed-length character data type, the varchar is a variable-length character data type.
Because char is a fixed-length data type, the storage size of the char value is equal to the maximum size for this column. Because varchar is a variable-length data type, the storage size of the varchar value is the actual length of the data entered,

8) Difference between internal and protect internal

Internal: Allows access to the class member only in the same assembly.
Protected internal: Allows access to the class member only within the same class, from inherited classes, and other classes in the same assembly.

9) Runtime polymoraisum

to decide at run time which function will execute.

for example in overriding there are two function with same name (one in derived class other in base class)
when ever you call this function it will be decided at runtime which function is to call

Polymorphism means taking many forms
there two types of polymorphiism
1. Compile time polymorphiism or early binding:
   It takes an action at compile time
     e.g. operator overloading, function overloading
2. Dynamic polymorphiism or late binding
  It takes an action at run time.
  e.g.: Virtual functions

1) Garbage collection and generations

2) Web.config

What is needed to store connection string in web.config?

3) What is Authentication? Have u used in your application.

4) Xml and xslt–How u transform from xml to xslt.

5) Difference between stored procedure and function

6) How to call function and stored procedure

7) Pass by value and pass by reference

8) What is managed code and unmanaged code

9) What is the use of web.config?

10) Page life cycle of .net

11) What is web service and removing?

12) What is difference between webpage and web service

13) What is difference between usercontrl and master page?

14) What are new feature in asp 2.0 and difference between 2.0 and 1.1?


1) How we do security in your project?

2) Difference between array list and hash table?

3) What type of data will accept for range valuators?

4) Write a program to create a text box dynamically?

5) How can you return a value from stored procedure?

6) What is a property?

7) What are collections?

8) What is a namespace?

9)i have namespace A ,class A ,function in one class file and namespace B in another file can we overwrite

Function and i have imported the namespace in namespace B ?

10) What is a data grid?

11) What are data members?

12) How to update the information in using data grid?

13) Can i have class with in a class?

14)i have class ,in Class i have Class B in class main how can i access class B Members?

TCS Interview Questions–

1) Why u left the from your previous company with in a one year

2) What is .net frame work?

3) What is length of int and string?

4) What is difference between stack and heap? Which one is fast?

5) Which stored procedure you faced critically in your project?

6) Tell me the different types of cursors

7) What is view state?

8) What is session?

9) Array is reference type or value type.

10) How can you store the values from data grid to table in back end

11) Which features are you have used in your project


1) What are constraints?

2) Different type of constraints

3) Can i create the 2 primary keys for 1 table?

4) What i composite key

5)can i insert the null value in to the Foreign Key

6)what is partial in

Semantic by Venus

1) Explain about your project.

2) How tables you are used in your project

3) Can create the primary key which we already have cluster index for a table

4) Diff stored procedure and view

5) Max no of composite keys for one table

6) Diff dll and exe

7) how you create shared assembly

8) What is strong name?

By SieraAtlantic


1) What is primary Key and composite key?

2) What is trigger and different types of trigger?

3) How to deploy your application

4) Can i use stored procedure in function?

Hylcian—My Friend Faced these questions







5) How to rename the database

6) How change the column data type in table





4) What IS CAS


6) How to read the values from stored procedures.

7) What is interface and abstract?

8) What is array and array list?

—————–Virtusa Questions——————

1) Garbage collection and generations

2) Web.config

What is needed to store connection string in web.config?

3) What is Authentication? Have u used in your application.

4) Xml and xslt–How u transform from xml to xslt.

5) Difference between stored procedure and function

6) How to call function and stored procedure

7) Pass by value and pass by reference

8) What is managed code and unmanaged code

9) What is the use of web.config?

10) Page life cycle of .net

11) What is webservice and remoting?

12) What is difference between webpage and webservice?

13) What is difference between usercontrl and master page?

14) What are new feature in asp 2.0 and difference between 2.0 and 1.1?

15) How create the user control and write the code of user control

1) The garbage collector (GC) of .NET completely absolves the developer from tracking memory usage and knowing when to free memory.

Every application has a set of roots. Roots identify storage locations, which refer to objects on the managed heap or to objects that are set to null.

objects in generation 0 are young objects that have never been examined by the garbage collector.

Now, if more objects are added to the heap, the heap fills and a garbage collection must occur

As even more objects are added to the heap, these new, young objects are placed in generation 0. If generation 0 fills again, a GC is performed


Figure 4 Generations 0, 1, and 2



1) What is .Net Framework?

Ans) The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts: the Common Language Runtime, the Framework classes, and ASP.NET.

2) Type-safe

Ans) Code that accesses only the memory locations it is authorized to access, and only in well- defined, allowable ways. Type-safe code cannot perform an operation on an object that is invalid for that object

3) What is diff Stack and heap?

Ans) briefly speaking stack is used to store variable data of fixed length.

Heap is used to store data whose size and length can only be determined at runtime and are subjected to change. But a reference to that data is stored on the stack.

4) Auto Post Back

Ans) automatically posts the page back to the server whenever the value of the control in question is changed.

5) Post back

Ans) Post back is nothing but the process in which a Web page sends data back to the same page on the server. So when the first time the page loads there is no post back that is "Ispostback " is FALSE.

6) Post

Ans) sending the data to the one page to another or to the same page.

7) View state

Ans) The important fact about the View State is that it can only save the values for page level access.

View state is a functionality of ASP.NET to preserve the values of controls on the same page when page reload.

8) Delegate?

Ans)  Delegate is a function pointer.  
ii) It allows the programmer to encapsulate a reference to a method inside a delegate object.  
iii) Delegates are type-safe and secure.
iv) Delegates are created at run time.

Delegate is function pointer which stores the address of sub program

If we want to use delegates, first we have to create parameters.
//create a delegate variable
string Function function Reference;
//store a reference  to a matching procedure
Function Reference=TranslateEnglishtoFrench;
private StringTranslateEnglishtoFrench(String English)

9) Foreign Key

Ans) a foreign key is a referential constraint between two tables

Referential integrity is usually enforced by the combination of a primary key or candidate key (alternate key) and a foreign key. For referential integrity to hold, any field in a table that is declared a foreign key can contain only values from a parent table’s primary key or a candidate key

Thus, a row in the referencing table cannot contain values that don’t exist in the referenced table

10) Composite Key

Ans)A key formed by combining at least two or more columns is called composite key

———————-Bank Of America——————

What are session modes?

Have you used repeater control?

How can you find the name in array list?

How can you validate a textbox is empty in data grid?

What is caching? How may types of caching?

Caching is a technique of persisting the data in memory for immediate access to requesting program calls. 

Caching in supports three types of Caching
1. Page – Level         Caching
2. Page – Fragment   Caching
3. Programmatic       Caching

What is a web service?

Web Service is software components that expose a service over the web.
· It allows applications to share data and functionality.
· It can be called across platforms and operating systems regardless of the programming language used by applications

What is WSDL?

Web Services Description Language is XML based language to describe how to access a web service and what operations it will perform

What are HTTP Handlers?

HTTP Handlers – These are used for handling HTTP request with specified file type. e.g.

What is hashtable?

You can say that Hash Table is just a table that contains two fields one is a key field and other is a value field. you can store values for the corresponding key into that Hash table

What is correlated sub query?

A subquery that references a column in the outer statement. The inner query is executed for each candidate row in the outer statement.

What is self join?

Joining the same table to itself

If I have 20 pages if I am using one page directly it have to redirect to login page how will you validate?

How will you read the data in a flat file?

What is an interface?

What is pure polymorphism?

What is inheritance?

How will you implement multiple inheritances?


1) How to eliminate the duplicates in sqlserver

2) What is trigger and how many types of trigger

Ans) AFTER Triggers:

An AFTER trigger is a trigger that gets executed automatically before the transaction is committed or rolled back.

Note: If a table has multiple AFTER triggers, then you can specify which trigger should be executed first and which trigger should be executed last using the stored procedure sp_settriggerorder. All the other triggers are in an undefined order which you cannot control.

we cannot create an AFTER trigger on views.


INSTEAD OF triggers gets executed automatically before the Primary Key and the Foreign Key constraints are checked, whereas the traditional AFTER triggers gets executed automatically after these constraints are checked.

Unlike AFTER triggers, INSTEAD OF triggers can be created on views.

So whenever a user tries to insert data into the view vwUserMaster, the INSTEAD OF trigger trgOnView will automatically be executed.

A view or table can have only one INSTEAD OF trigger for each INSERT, UPDATE and DELETE events.

We have seen that you can create any number of AFTER triggers on the table for the same event, whereas you cannot do that with INSTEAD OF triggers.

In SQL SERVER 2000, views can be used to INSERT/DELETE and UPDATE the data in the multiple tables, and this can be achieved using INSTEAD OF triggers.

From the output, it is clear that you cannot create two INSTEAD OF triggers on the view/ table for the same event.

Triggers can be used in the following scenarios, such as if the database is de-normalized and requires an automated way to update redundant data contained in multiple tables

3) What is fill factor?

Ans): The fill factor is implemented only when the index is created

Trying to maintain the extra space on the data pages would defeat the purpose of originally using the fill factor

Therefore, if the data in the table is significantly modified and new data added, the empty space in the data pages can fill. In this situation, the index can be re-created and the fill factor specified again to redistribute the data.

4) What is managed code and unmanaged code

5) How to execute the unmanaged code in .net

Ans) Directly By the OS

6) What is view state?

Ans): View State is used the retain the state of server-side objects between post backs.

7) What is session? How many types is there to store the session in


ASP.NET gives you a better way to store state for each user on the server with the Session object. Every time a new browser hits your ASP.NET application, a new Session object is created for that Web browser

Storage Location

1. Import: session stored as live object in web server process(awpnet_wp.exe)
2. State Server: Session state are serialized and store in memory of separate process (aspnet_stae.exe).However it is possible we can run state server to another machine.
3. SQL Server: session serialize and store in SQL Server

8) Authentication types and what is form authentication

9) What is index?

10) What is clustered index and non clustred index?

11) What is CAS?

12) What is method overloading and method overriding?

13) What is encapsulation?

Ans): Encapsulation is the process of binding data members and member functions into a single unit

14) How many types of polymorphism

15) What is abstract and interface

16) What is webusercontrol and custom control?

17) What is private and shared assembly?

18) Can I use trigger in view

19) Can I do any operation on view?

20) How can store the session in sqlserver

21) What is the event will invoke while you are clicking the button in data grid.

22) What is master page?

Helcian: My Friend faced these questions

1) Which design patterns you have used for your project?

2) Which architecture you have used for your project.

3) Explain about MVC

4) What is partial class?

5) What is interface and abstract?

6) In which situation we have to use the abstract and interface

7) What is array and array list?

8) What is index?

9) What is property?

10) What is indexer?

11) What are different types of management techniques in

12) What is diff cache object and application state?

13) What tags is there in web.config

14) What are diff types of authentications?

15) What is string and string builder?

16) What is encapsulation?

17) What is stored procedure and function?

18) Can use the stored procedure in function and vice versa

19) If create the view for table can we remove the table from the database

20) What is cluster index and non cluster index?

21) What is limitation of non cluster indexes in each table?

22) What is oops a concept?

23) How can u compile the stored procedure in sqlserver?

24) What is diff 1.1 and asp.Net?

25) What is difference between finalize and dispose method

26) How the garbage collector will call automatically

27) How u can improve the performance of query.

28) What is application state and cache?


1) What the services will give by iis?

2. Try


Io exception


Catch (exception)


File not found exception


Catch (exception)


Io exception





Which catch block will be execute

3) Find the maximum salary in one table

4) If u creates a 2 web.config file for each application which web.config will work

5) What is authentication?

6) What is satellite assembly?

7) What is diff union and union all

8) What is work flow in run project?

9) What are generics?

Related Posts Plugin for WordPress, Blogger...

Enter your email address:

Delivered by FeedBurner

Share This Post

Related Articles

© 2015 The Opening Batsman. All rights reserved. Site Admin · Entries RSS · Comments RSS
Visit to discover Indian blogs Powered by WordPress · Designed by Theme Junkie
seo seo consulting escalateseo seo basics seo tools seo tips seo tutorial seo services google seo seo software seo forum