.Net Interview Questions Part IV

TCS Mumbai


  1. Locks
  2. Concurrency
  3. Error handling in Sql server 

      @@Rowcount , @@Error

  1. Error handling in .Net
  2. How to pass parameters in stored procedures

     IN , OUT parameters

  1. create proc sp_nam( @a1 IN, @a1 OUT)

     Can we used the same parameter name as input and output.?

  1. Can we configure the Server of our application with 2 different versions of      


  1. What is Polymorphism?
  2. In function overloading can we  write as below:


  i. functionname(int a1)

         samefunctionname(float a1)

      ii. function(int a1)

          samefunction(int a1,int b1)


  1. Can we remove global.asax file from our application?
  2. What is the use of global.asax file
  3. What are the events in global.asax file
  4. Can we have more than 2 machine.config files in IIS servers?

Can we install 2 IIS versions in one system?

  1.  what is the use of web.config and machine.config files? What is the difference between these 2 files?
  2. What is the difference between HTML server control and Web Server control?
  3. Say something about Datagrid? What is the use of Bound Columns? We gave AutoGenerateColumns = True and we have 3 BoundColumns out of 5 columns. How many columns are displayed in the grid? Ans: 5
  4.  What is the use of autogenerate columns?
  5. Which one is better DataReader/DataSet in terms of performance?
  6.  Can we pass null values to stored procedures?
  7.  Difference b/w Order BY and GROUP BY in SQL?
  8. How to submit one page information to another? Which methods are used? Ans: POST and GET 

POST  : Request.Form

GET :    Request.QueryString


If we are using Request then what is the default method it takes?

Ans : QueryString (doubt)

  1. Difference b/w Response.Redirect and Server.Transfer?


  1. Can we connect 2 different databases of Sqlserver to our application? How to connect?
  2. Can we connect oracle and sqlserver at the same time?
  3. In web.config  <errors mode=Debug ,none,remote
  4. In web.config <trace  mode = verbose, none
  5. In web.config <sessionstate mode=sqlserver , stateserver inproc,outproc,stateserver
  6. How to debug javascript function in frontend?  Ans: IE -> Tools -> Internet Options-> Advanced ->Uncheck  “Disable Script Debugging (IE)” and “Disable Script Debugging (others)”.
  7.  <Compilation debug = true / false > ie Debug and Release.

In terms of performance which one is better? Ans: In the application itself we have bin folder. In Debug mode dll size is more and release mode dll is small.

Use Release mode in production as it removes breakpoints and dll size is less.

  1.  What is viewstate?
  2.  Can we write nested try catch blocks?

           we can write n number of catch blocks for a single try block. If errors occurs  

            only the related catch executes.

  1.  Can we compare two dates in Asp.net? How?  Which control to use?  Eg: RegularExpression validator.  Don’t use Comparevalidator control (it is for string,int)
  2. Repeater control
  3. What do you know XML?
  4. Diff b/w custom controls and user controls
  5. Diff b/w Stored Procedure and function
  6. select * from functionname …….. Can we write like this if the function is returning some table. Ans : Yes .
  7. What are table valued, scalar valued functions.. Diff functions in Sqlserver
  8. How do u execute Scalar Valued and table Valued functions in Sqlserver

Ans : select * from fucntionname …. (Table Valued function .. It returns table)

           Exec function functionname   .. (Scalar valued function .. It returns single value)



Gujarat Ahmedabad company

  1. How to provide pagination in Datagrid? Ans: AllowPaging = true ..Event(PageIndexChanged) to be written in codebehind.
  2. DBCC commands
  3. Viewstate . How they implemented ? Ans : Hidden value

       It is specific to the page

       What is the difference between ViewState and Hidden Values. 

  1. Sql Profiler
  2. What are views? Security

Read Only Views

If we change any value in view will it effect the backend table?

  1. What are Cursors? Types of Cursors?
  2. What is Stored Procedure? Give an example?
  3. How to submit one page information to another?

Session , Cache, QueryString, Cross Page post back

Get Post

  1. What are directives in Asp.net?   Different directives?

10.  Difference b/w Response.Redirect/ Server.Execute and Server.Transfer?

11.  What are joins? Types of Joins?

12.  Does C# supports multiple inheritance?

13.  What is an interface?

14.  Difference b/w interface and abstract class?

15.  What is a webservice?

16.  What is the formatting protocol used in Webservices ? Ans: SOAP

17.  Which one of the following is used in Webservices  – DataReader / DataSet/DataList    Ans: DataSet

18.  What is the difference b/w function overloading/ overriding?

19.  What is the difference b/w system.string and system.stringbuilder

Mutable .. immutable

20.  Difference b/w System.Int32 and int?

21.  Difference b/w String and string

22.  C# access modifiers

23.  What is normalization ? Different types of normalizations ?  Give examples?

24.  What is Denormalization? Why and when to denormalize?

25.  Dotnet features?

26.  Dotnet assemblies and types of assemblies

27.  What is the transmission protocol used in webservices ? Ans: HTTP

28.  What are the differences b/w ASP and ASP.Net?

29.  What is ADO.NET

30.  How many languages supports .Net?


INDPRO  (9/9/2006)


  1. What are SqlCommand objects methods? What is the difference b/w ExecuteNonQuery and ExecuteScalar?
  2. What is the diff b/w DataRepeater and DataList?
  3. What is the diff b/w Container.DataBind , Eval, Bind

Ans:  Eval for formatting the data like date format

           Bind directly binds and displays the db data as  it is.

  1. What is the diff b/w Array and ArrayList
  2. Difference b/w Hash Table and ArrayList
  3.  What are Enumerations , Collections
  4. For raising an event of a control (which is present in usercontrol) where to write the code ( In usercontrol or webform)
  5. Page Life Cycle Events
  6. Mention Application and Sessions events of Global.asax

10.  When viewstate is loaded in  Page Life Cycle (Is it Init or Page Load)

11.   Template column in DataGrid? How hyperlink is used in Asp.net datagrid?

12.  What is the use of webserver controls

13.  Page Directives

  1. Diff b/w interface and Abstract  class
  2. What is viewstate and where it is stored
  3. Purpose of FXCOP
  4. What is unmanaged code? How CLR executes Unmanaged code
  5. Write a SP that returns the largest of two numbers



EMids Technologies Pvt Ltd

  1. In FXCOP can we define our own custom rules? How ?
  2. Diff b/w Sqlserver 2000 and 2005
  3. Equals method comes under {String} class


Tostring, Equals,GetHashCode , GetType .. default  methods of an Object

  1. What is the default base class for all classes  Ans: System.Object
  2. Base class for Asp.net pages
  3. Base class for Windows Forms
  4. What is the diff b/w Class and object? Real world example?
  5. Diff b/w HTML Server control and Web server control? What is the base class for these two controls? Can we convert HTML server control to webserver control?
  6. How to call javascript function?  Where we will write the code for calling the function

10.  There is an Employee table. What are the steps involved in populating the datagrid with this table

Employee IDs from 1 to 5000 are there. Without changing the query in the above example fill the datagrid with values Empid < 100

Ans: Use Dataview for filtering the records in dataset

11.  Diff b/w Stored Procedure and function

12.  What are the parameters of SP ? What is the default parameter in SP. Ans: In,Out, INOUT and default is IN

13.  Two textboxes and submit button is there. Which validation control in Asp.net to be used to validate those textboxes. What are the properties to be set in validation controls? Ans: ControlToValidate and ErrorMessage

Without using validation controls how to validate the above things.Any properties are there.? How to validate controls through coding



FCG (5/12/2006)

  1. Diff b/w Interface and Abstract class? When to use these ?
  2. What is an Assembly
  3. Diff b/w custom and user controls
  4. Diff b/w DataSet and DataReader
  5. Diff b/w DataSet and DataTable
  6. Diff b/w Overloading and Overriding with example codes
  7. What is runtime polymorphism  and compile time polymorphism
  8. What is Static Binding, Dynamic Binding
  9. What is Late and Early Binding

10.  What are the different ways of using NEW operator

11.  What is AS,IS in C#

Ans: AS is for type casting

    IS is for comparing objects

12.  What are Transactions in Sqlserver and in ADO.Net

13.  What are ACID properties?

14.  What are LOCKS. Diff Locks

15.  Concurrency

16.  Isolation levels

17.  Diff b/w Convert.ToString() and ToString()

18.  diff b/w ParseInt and int.Parse() and what is IsParseInt

19.  If two developers are updating data into the same dataset then how the dataset will update the data

20.  What is Biztalk Orchestration?

21.   How to use the webservice to get the document from Document Library in SharePoint

22.  Want to give some permissions to the documents in the document library so that users can see only particular documents. How to achieve this?

23.  What is base class for ASP.Net Page ? Ans: System.Web.UI.Page

24.  System.Object – >  a. GetType

                                b. GetHashCode

                                c. ToString

                                 d. Equals

25.   Types of Polymorphism?

26.  Types of Caching and with example code

27.  Session Management

28.  What are the conditions to use INPROC/OutProc

          InProc …. When we want to work with only one webserver

          OutProc…. When we have multiple webservers

29.  NUNIT, FXCOP . Write unit test cases in NUNIT

30.  C# access specifiers. What is default Access Specifier Ans: Public

31.  Diff b/w internal and Protected Internal

32.  What are Out and Ref parameters in C#

         For out no need to initialize , Ref needs initialization

33.  What is Call By Value and Call By Reference

34.  Specify default base classes for following controls

Control Name Base Class
WebControls System.Web.UI.WebControls
HTML Controls System.Web.UI.HTMLControls
Class System.object
Form System.Windows.Form
Asp.Net page System.Web.UI.Page
Asp.Net WebPart System.Web.UI.WebControls.WebPart

35.  What is Implicit Type Conversion

Ans: Converts smaller datatype to higher datatype

36.  What is Garbage Collection

In C# explain

What are the namespaces


Different Periods in GC

37.  How to use these tools


NCOVER – Code Coverage

NUNIT  – Unit Testing tool

FXCOP – Code Analysis Tool


NANT – deployment scripting tool





  1. What is the use of FileUpload Control? Default file size: 4 MB.Cane we increase the     default file size?

Ans: Yes by using MaxRequestLimit

  1. What is transaction? Ans: Process following ACID rules
  2. When to use interface?Can we overwrite virtual functions? How multiple inheritance is possible in C#?
  3. function overloading is early binding,function overriding is late binding
  4. Diff  b/w XML Serialization & binary serialization.

Ans: XML Serialization – Webservices

         SOAP Serialization for Remoting

  1. How to refresh an aspx page automatically. Ans : by using meta tag
  2. Is clustered index created automatically? Ans: when we are create primary key on a table.
  3. Diff b/w dispose and finalize?
  4. Diff b/w Web services and Remoting

10.  what is a delegate? what are event delegates?

11.  How to avoid SQL Injection?



US Technologies


  1. Diff b/w interface and abstract class? Can we create an instance for abstract class?
  2. How to create a web part and how to place the web part in Share point portal?
  3. How to GAC the dll? What happens when we GAC a DLL? Where the DLL is stored?
  4. What is the use of stored procedure? What happens when a SP is compiled?
  5. Types of Joins. Ans: Inner Join, Left Outer Join, Right Outer Join, full join Cross Join, Self Join.
  6. Use of Createchildcontrols and RenderContents methods of web part creation
  7. Bubbling Events

8.   What is the namespace that is used for sending email?


One Response to .Net Interview Questions Part IV

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: