Top .Net Interview Questions For 2016


07 Jan 2016

1.What is ASP.NET? is a free source server side web application framework vital for web advancement to create dynamic web pages.

2.List the sequence in which ASP.NET events are processed?

Here is the sequence which, if followed by the ASP.Net events for processing:


Page Load

Control events

Page- Unload event

It is the sequence of events occurs sequentially starting from the page_Init and subsequent events occurs on request.

3.What is the difference between Assembly and Namespace?

Assembly is the building block of the .NET Framework, whereas Namespace is the aggregation of different classes.

4.Explain “AutoPostBack”?

AutoPostBack automatically post back the event to the server side. It performs this function according to-whether check attribute is made true or not. If it’s true, then it will automatically post back otherwise not.

5.How to find that the Page is Post Back?

Page object has a property called IsPostBack, That must be checked to identify the page is posted back

6.What is smart navigation?

When the page is refreshed because of server side validation, the page gets refreshed and the cursor position is maintained.

7.Full form of ADO?

ActiveX Data Object

8.What are the two basic objects in ADO.NET?

Data Reader and Dataset are the two basic objects in ADO.NET

9.Difference between Late and Early binding?

Calling a virtual method, determined at a run time is called as late binding and calling a non virtual method, determined at a compile time is called as early binding

10.What is CTS?

Common Type System (CTS) is a rich type system, based on the common language runtime,which supports the operations and types found in most programming languages

11.How to display complete validation messages in one control?

Using the validation summary control displays complete validation messages in one control.

12.What happened to Authentication form if cookies are not enabled, it works or not?

No, It will not work

13.Which namespace is required to enforce debug and trace?


14.What is ViewState?

View State is one of the feature of the ASP.NET web page, which stores the value of a page and its control almost posting the page. Just after the page is posted, its first task of the page processing is to regain the Viewstate to earn the values of the controls.

15.Purpose of Orientation property in a Menu control?

Orientation Property handles the display position of the of a menu on a web page either horizontal or vertical, but by default it is set as vertical display

16.Differentiate between server-side and client-side validations in Web pages

Server side validations occur at the server end and client side validation appears at the client end with the help of VBScript and JavaScript afore the web page is sent to the server.

17.How to connect to a database by applying .NET?

The connection class is applied to connect a .NET application with a database.

18.What is the basic use of DataView?

Data View is a set of methods for sorting and finding of data within a data table. It represents a complete table or a small section of rows based on some rules.

Dataview has the following methods: Find, AddNew, FindRow, Delete

19.Information about how the user’s locale can be accessed?

User’s locale information can be achieved by using the system. Web. UI. Page. Culture Property.

20.How to register a custom server control to a Web page?

Using @Register directive custom server control to a web page can be registered

21.Determine the Behavior of a web browser, when it gets an invalid parameter?

It depends completely on the type of browser one use for browsing applications. Some browsers display the invalid element on the page, but most of the browsers ignore the invalid element.

22.What are the advantages of the code-behind feature?

Code behind feature has many advantages, some of them are:

Delivers the separate effort between software engineers and graphic designers.

Makes the code easier to debug and understand by aparting application logic from HTML tags.

Eliminates the issues of browser incompatibility by delivering code files to exist on the web server and assist web pages to compile on demand.

23.What is returned from the server to the browser when browser appeal an .aspx file and file is displayed?

When a browser appeal an .aspx file then the server delivers a response, which is rendered into an HTML string.

24.What is the difference between trace and debug?

Utilize trace class for both debug and release builds.

Utilize debug class to debug builds.

25.What is a custom tag in web.config file

It permits to create self tag and define key value pair for it.

26.Types of configuration files and their difference.

Application level config = Web.config

Machine level config = Machine.config

27.How do you retrieve username in case of windows authentication?


28.What is EnableViewStateMAC?

When EnableViewStateMac is correct for a page, the encrypted and encoded viewstate is verified to validate that it not get tempered with the client machine.

A EnableViewStateMac is an encoded version of the hidden variables that a pages viewstate is persisted to when sent to the browser.

29.What is diffgram and its use?

The diffgram is one of the two XML designs that is utilized to render dataset object contents to XML. A good use is reading database data to an XML file to be sent to a web service.

30.What is the life span for items stored in Viewstate?

Items stored in the ViewState lie for the life of the current page. This includes postbacks.

31.How to improve performance of web page in

Minimize the use of view state, turn off tracing, Session, etc.

32.List all templates of the Repeater control.






33.What are the types of authentication in ASP.NET?

Three types of authentication available in ASP.NET:

Forms Authentication: authenticate against a user in a database or customized list of users.

Windows Authentication: This authentication method utilizes built-in windows protection features to authenticate user.

Passport Authentication: corroborates against Microsoft Passport service which is fundamentally a centralized authentication service.

34.Whether session uses cookies or not?

No, session is stored in server memory.

35.What is the method to explicitly kill a user session?


36.What is the validation control in asp.Net?

There are 5 validation control in






37.What’s the use of GLOBAL.ASX file?

GLOBAL.ASX is a file that resides in the root directory of the application. It is inaccessible over the web, but it is used by the asp.Net application if it exists. Settings on a site can be changed and set by utilizing the assortment of event handlers. The event comes from any of the two places – The HTPApplication object and HTTPModule object that are stated in web.config or machine.config.

38.What is the file extension of web service?

.asmx is the file extension of the web service.

39.How many languages does .NET is support?

.NET when introduced supports several language, now it supports more than 44 languages such as VB.NET, COBOL, PERL, C#, etc.

40.What is an Application Server?

It’s a software engine that provides applications to client devices or computers. It runs server code. Some of the examples of application server are- IIS, JBoss, WebSphere, Weblogic Server.

41.What is inheritance?

Inheritance shows the relationship between two classes, in which one type acquires functionality from a second type and then enhance it by adding new methods, events, properties, constants and fields. C# endures -Interface and Implementation inheritance

42.What is inheritance hierarchy?

Inheritance hierarchy is a tree like structure which describes the relation between different class. The class which derives functionality of a base class is called a derived class. In the same manner derived class can become a base class for some other class. All these relations form a tree like structure called as inheritance hierarchy.

43.What is Business Logic?

Business logic is the functionality which manages the exchange of information between the user and database interface.

44.What are design Patterns?

Design patterns are common answers to the common structure issue.

45.How ASP .NET different from ASP?

Scripting is different from the HTML, code is compiled as a DLL, and it is executed on the server.

46.Define ADO.NET and point out the difference between ADO and ADO.NET?

It’s a stateless mechanism.ADO.NET can used as a separate in-memory database to use it for updating the actual database as a batch and for storing the relationships between the tables and select insert, then updates to the database.

47.How to avoid class from being inherited?

In VB.NET, use not an inheritable modifier to avoid programmers from utilizing the class as a base class.

In C#, use the sealed keyword.

48.What is a flat file?

A text which can be read or write only sequentially known as a flat file.

49.What is the Global Assembly Cache?

Global Assembly Cache is a machine wide cache of assemblies that permts.NET applications share libraries. And it provides solutions to some of the issues belongs to DLL Hell.

50.Way to manage pagination in a page?

In DataGrid control there is an option called pagination there we have to set the number of records for a page, then it automatically take care of pagination in a page.

Comments are closed.