Interview Questions and Answers

06 Feb 2023, 18 Questions

As a new age web development platform, ASP.NET includes a programming model, a software infrastructure and a vast number of services required to create web-based applications for both desktops as well as mobile devices. This framework also allows programmers to build dynamic websites and web services. It operates on top of the HTTP protocol and utilizes commands and policies of HTTP to set browser-to-sever bilateral cooperation and communication. The application codes for ASP.NET can be written in any of the following languages, which are C#, JScript, j# and Visual Basic.Net.

You will get the insight of ASP.NET through interview questions professionals as well as for freshers.

Most Frequently Asked Interview Questions

Here in this article, we will be listing frequently asked Interview Questions and Answers with the belief that they will be helpful for you to gain higher marks. Also, to let you know that this article has been written under the guidance of industry professionals and covered all the current competencies.

Q1. Explain the difference between ASP & ASP.NET.

The prime difference between these two is that ASP is interpreted platform as scripts are being used, whereas ASP.NET is a compiled platform because of its pages using .NET languages. All the ASP.NET pages are MSIL (Microsoft Intermediate Language) compiled.

1 0
Q2. What is IIS? Why is it used?

Internet Information Server or IIS is developed by Microsoft with its own operating system. It is used to execute web page scripts. It works in between ASP.NET engine and browser to process chrome requests and responses are submitted back.

0 2
Q3. Explain the ASP.NET page life cycle.

An ASP.NET page goes through a series of stages in the life cycle as following,


Page Request => Start => Initialization => Load =>Postback Event Handling => Rendering => Unload

1 0
Q4. 4. What’s the difference between ASP.NET Web Forms and ASP.NET MVC?

Both ASP.NET Web Forms and MVC are tolls with different strengths and workability. Web Forms are used to create web apps with ASP.NET and utilize designer and server controls to design a form with a point and click interface, whereas VMS is used to separate as web app into data, actions and display.

0 0
Q5. Explain the ASP.NET session state modes.

There are five primary session state modes present in ASP.NET.

  • InProc Mode – Stores session state in the web server memory
  • StateServer Mode – Stores session in ASP.NET state service
  • SQLServer Mode – Store the session state in a SQL database
  • Custom Mode – Developers can specify the storage provider here
  • Off Mode – Completely disables the session state
0 0
Q6. What’s the difference between Response .Redirect and Server.Transfer?

Server.Transfer sends information from one web request to another on the server side, But, Response.Redirect sends an HTTP 302 message to the browser and implements a redirect in the browser.

0 0
Q7. Mention few ASP.NET validators.

Here are the few most used ASP.NET validators by developers:

  • Required Field Validator
  • Range Validator
  • Compare Validator
  • Summary Validator
  • Regular Expression Validator
  • Custom Validator
0 0
Q8. What is an ASP.NET validator? And, mention its types.

An ASP.NET validator controls validate the user input data. Whenever the user shares an input, it must validate them before sending it across various layers of the application.


There are two types of validation used in ASP.NET:

  • Client-side validation
  • Server-side validation
0 0
Q9. What is ViewState?

It is used to retain the state of the server-side objects between page postbacks. After the page postback, it is stored in a hidden field on the page at the client side. It is transported to both client and server side, and not stored on the server or any other external source.

0 0
Q10. Explain cashing in ASP.NET.

The caching technique is used to increase performance level in ASP.NET by keeping frequently accesses files or data in memory. The request for a cached data/file will be directly obtained from the cache instead of the actual location of that data or file.


ASP.NET has three types of caching:

  • Data Caching
  • Fragment Caching
  • Output Caching
0 0
Q11. Explain the use of fragment caching.

Fragment caching is used to cache a portion of a target page instead of the whole page. The target portion can be generated by request. For this, developers can create a control with the below syntax:

<%@ OutputCache Duration="120" VaryByParam="CategoryID;SelectedID"%>

0 0
Q12. What is syntax code to send email from an ASP.NET application?

Developers use the following syntax code to send email from an ASP.NET application:


  • MailMessagemailMess = new MailMessage ();
  • mailMess.From = "[email protected]"
  • mailMess.To = "[email protected]"
  • mailMess.Subject = "Test email";
  • mailMess.Body = "Hi This is a test mail for bestinterviewquestion.";
  • SmtpMail.SmtpServer = "localhost";
  • SmtpMail.Send (mailMess);
1 0
Q13. Explain the difference between the web config and machine config.

Machine config is severed specific, whereas web config is specific to a web application. Only one machine config file can be present on a server, but multiple web config files can be implemented into an application.

0 0
Q14. What is role-based security in ASP.NET?

This process is used to implement security based on roles assigned to different user groups in an organization. We can allow or deny permissions to users based on their organizational role.

0 0
Q15. Is it possible to apply themes to an ASP.NET application?

Yes, it is possible to apply themes to an ASP.NET application. Developers can specify them in the web.config file with following syntax:



<pages theme="Windows7">



1 0
Q16. Explain weak typing and strong typing.

In weak typing, the variable data types are checked at runtime, whereas in strong typing, the data types of variable are checked at compile time. There is no chance of compilation error in strong typing.

0 0
Q17. What are the cookies types in ASP.NET?

ASP.NET has two types of cookies:

  • Persistent Cookie: presents on a user’s machine for a specified period of its expiry
  • Session Cookie: presents on the client machine for only a single session, until the user doesn’t log out.
0 0
Q18. Explain the difference between SQL invalidation and SQL notification.

SQL invalidation directly invalidates the data present in the cache when a change is applied in the database that is copied to cache earlier. Compared to this, SQL notification triggers only when there is a change in the data that is made a copy in the cache.

0 0

Development History of ASP.NET

The platform was first released in 2002 by Microsoft with a version 1.0 of the .NET framework as a successor of Microsoft’s ASP (Active Server Pages) technology. It can operate on Microsoft Windows, macOS and Linux.

Latest Version

The most recent stable version of ASP.NET, version 4.7.1, was released in October 2017 with improved accessibility, value tuple types serialization and SHA-2 support feature additions.

With its language independence and countless other user benefiting features, ASP.NET is a popular platform for businesses, creating a massive demand for skilled individuals in this niche, Here in below; we are mentioning a set of top ASP.NET interview questions and answers prepared by experts for interview aspirants.


  • Less coding required with ASP.NET framework technology to build large web applications.
  • It’s a language independent platform, which means developers can use any programming languages best suited for their application.
  • It offers better performance with native optimization, early binding, and just-in-time compilation.
  • It’s pure server-side technology, which means the code executes on the server before it is sent to the browser.
About Best Interview Question
Best Interview Question
Technical Consultant

With our 10+ experience in PHP, MySQL, React, Python & more our technical consulting firm has received the privilege of working with top projects, 100 and still counting. Our team of 25+ is skilled in distinct programming languages such as Python, Java, React.js, Angular, Node.js, PHP, HTML, CSS, Designing, iOS and Android apps, Database, .net, QA, Digital Marketing and Govt. jobs, etc. We are helping 10+ companies in solving their technical problems. When not found coding, our technical consultants can be seen helping out others.