Interview Questions For Experienced and Beginner .NET Professionals


Hi, I hope you are all fine. If you are a .Net professional and if you are looking for a change in job (especially in Infosys, IBM, DELL, Aversan) you may want to read: Interview Questions For 3 Year .NET Professionals.

You can find another series of interview questions here

I have described my interview experience there. Now I will share some other important series of questions that will definitely ask in any .Net interview. What employers currently look for in a candidate is logical understanding with basic knowledge. So understanding the basics is very important, even if you are an experienced candidate.

So let us start. I hope you will like this article. Please provide your valuable comments so that I can improve myself.

First of all you must be ready to introduce yourself. Please don't use so many “mmmmm” and “And and and”. Be confident and don't urge. Take your own time to describe yourself. Look straight. You can find more tips here: How to Prepare for a Job Interview.

Now we will concentrate on the technical questions.

Please note that these questions are asked in my interview experience, you may need to see more questions when you go for your interview.

1. What is the sequence of execution of the ASP.NET page life cycle?

The simple way is to remember SILVER.
  • S (It is not counted)
  • I (Init)
  • L (Load)
  • V (Validate)
  • E (Event)
  • R (Render)

Read more here.

2. What is the difference between a Hash Table and a Dictionary?

The main differences are listed below.


  • Returns an error if the key does not exist
  • No boxing and unboxing
  • Faster than a Hash table


  • Returns NULL even if the key does not exist
  • Requires boxing and unboxing
  • Slower than a Dictionary

3. How to use View state?

  1. string str = "Sibeesh Passion";  
  2. if(ViewState["SampleText"]==null)  
  3. {  
  4.    ViewState["SampleText"] = str;  
  5. }  
4. What are the state management techniques used in .NET?

  • Hidden Field
  • View State
  • Cookies
  • Control State
  • Query Strings


  • Session

    1. In Proc mode
    2. State Server mode
    3. SQL Server mode
    4. Custom mode

  • Application.
Read here.

5. How can we create a new table in SQL with only the structure?

Here is the query to do that.

    Select * Into<B>From<A>Where1 = 2

Points to be noted:

  • A is the source table.
  • B is the destination table.
  • The condition 1=2 is to prevent the data from being copyied.

6. How to add a button dynamically to a grid view?

    1. Button myButton = newButton();  
    2. myButton.Text = "Hai";  
    3. myGrid.Controls.Add(myButton);   

7. How to find a control inside a GridView?

  1. Button btnTest = (Button) myGrid.Rows[0].Cells[1].Controls[1].FindControl("myButton ");  
Here we are finding the control myButton from the 0th row first cell.

8. What are abstract and interface? Provide actual examples.

Please read here.

9. What is partial class?

There are the following situations of when splitting a class definition is desirable: 
  • To work with large projects.
  • To split the class definitions as we needed with the keyword partial.

10. How to use a partial class?

    1. public partial class DailyExpenses  
    2. {  
    3.     To make it more real, let us consider this class is used by the Husband .   
    4.     He will add his expenses (in programming life , his codes )  
    5.     public void AddExpensesByHus()  
    6.     {  
    7.     }  
    8. }  
    9. public partial class DailyExpenses  
    10. {  
    11.    To make it more real, let us consider this class is used by the Wife.   
    12.    She will add his expenses (in programming life , her codes )  
    13.    public void AddExpensesByWife()  
    14.     {  
    15.     }  
    16. }   

11. How to remove a constraint from a table in SQL Server? 

    1. ALTER TABLE MyTab DROP CONSTRAINT myConstraint   

12. How to create Table Variables In T-SQL?

Normally the syntax to create a table variable is the same as to create a table statement. 

    1. DECLARE@tabVar TABLE  
    2. (  
    3.    Your fields here  
    4. )   

13. How can you delete a duplicate record from a table in SQL?

There are so many ways to do this. Here I am sharing what I use when I get that kind of situation.

I will create a temp table.

Copy the distinct data from the existing table to the temp table.

Empty the data in the existing table.

Insert the data from the temp table to the source table.

Here is the query to do that:

  1. select distinct * into #tempTab From Address_Tab
  2. delete from Address_Tab
  3. insert into Address_Tab
  4. select * from # tempTab
  5. drop table # tempTab

14. When to use an override and new in C#?

  • We can use override when there is virtual/abstract/override type of method in base class.
  • We can use New when there is no virtual/abstract/override type of method in base class.
That is all for today. I will see you soon with another set of questions and answers.

Please provide your comments and suggestions thanks in advance.

Kindest Regards


Up Next
    Ebook Download
    View all
    View all