top of page
ASP.NET Interview Questions and Answers

ASP.NET Interview Questions and Answers

Top 100 ASP.NET Interview Questions for Freshers

ASP.NET is one of the most widely used web development frameworks in top tech companies, including IDM TechPark. Its platform independence, robustness, and extensive libraries make it an essential skill for developers. To secure an ASP.NET developer role at IDM TechPark, candidates must be well-versed in ASP.NET concepts and ready to tackle both the ASP.NET Online Assessment and Technical Interview Round.
To help you succeed, we have compiled a list of the Top 100 ASP.NET Interview Questions along with their answers. Mastering these will give you a strong edge in cracking ASP.NET interviews at IDM TechPark.

1. What is ASP.NET?

Answer:
ASP.NET is a web development framework created by Microsoft for building dynamic web applications, services, and websites. It runs on the .NET framework and supports multiple languages, including C# and VB.NET.

​

2. What are the main features of ASP.NET?

Answer:
Key features of ASP.NET include:

  • Server-side scripting for dynamic web pages

  • Support for MVC and Web Forms

  • Built-in security features like authentication and authorization

  • State management techniques

  • Integration with ADO.NET for database operations

  • Scalability and performance optimizations

 

3. What is the difference between ASP.NET Web Forms and ASP.NET MVC?

Answer:

  • Web Forms: Uses event-driven programming with controls like GridView and Button, making it suitable for RAD (Rapid Application Development).

  • MVC (Model-View-Controller): Separates concerns into Model, View, and Controller, making it more flexible and testable.

4. What is the role of IIS in ASP.NET?

Answer:
IIS (Internet Information Services) is a web server that hosts ASP.NET applications. It processes and serves web requests, managing application pools, authentication, and performance settings.

​

5. What is the difference between ViewState and SessionState?

Answer:

  • ViewState: Stores page-specific data in a hidden field on the client side.

  • SessionState: Stores user data on the server and persists across multiple pages.

  • ​

6. What is the Global.asax file used for?

Answer:
The Global.asax file, also known as the Application file, is used to handle global application events like Application_Start, Session_Start, Application_Error, etc.

7. What are Master Pages in ASP.NET?

Answer:
Master Pages allow developers to create a consistent layout for multiple pages in an ASP.NET application. Content pages inherit the design and structure from the Master Page.

​

8. What is the difference between Server.Transfer and Response.Redirect?

Answer:

  • Server.Transfer: Transfers execution to another page on the server without changing the URL in the browser.

  • Response.Redirect: Redirects the user to a different URL, changing the address in the browser.

9. What are HTTP Handlers in ASP.NET?

Answer:
HTTP Handlers are components that process specific types of HTTP requests (e.g., serving images, RSS feeds, or dynamic content). They implement the IHttpHandler interface.

​

10. What is the difference between Authentication and Authorization?

Answer:

  • Authentication: Verifies user identity (e.g., login with username and password).

  • Authorization: Determines what a user is allowed to access after authentication.

 

11. What is the difference between ASP.NET Web Forms and ASP.NET MVC?

Answer:

Web FormsMVC

Event-driven modelFollows MVC pattern (Model-View-Controller)

ViewState is usedNo ViewState (more lightweight)

Tight coupling between UI and logicSeparation of concerns

Ideal for RAD (Rapid Application Development)Ideal for testability and control

​

12. What is the Global.asax file used for?

Answer:
Global.asax is the Application File used to handle application-level events like:

  • Application_Start

  • Session_Start

  • Application_Error

  • Application_End

  • ​

13. What is the use of ViewState in ASP.NET?

Answer:
ViewState is used to preserve page and control values between postbacks. It stores data in a hidden field on the page.

ViewState("Count") = 5 Dim count As Integer = CInt(ViewState("Count"))

​

14. What is the difference between Server.Transfer and Response.Redirect?

Answer:

  • Server.Transfer: Transfers to another page on the server without changing the URL.

  • Response.Redirect: Sends a new request to the browser and changes the URL.

  • ​

15. What is a PostBack in ASP.NET?

Answer:
A PostBack is a request sent from the client to the server when the same page is posted back to itself.

​

16. What are the different types of validation controls in ASP.NET?

Answer:

  • RequiredFieldValidator

  • RangeValidator

  • RegularExpressionValidator

  • CompareValidator

  • CustomValidator

  • ValidationSummary

  • ​

17. What is the use of Session in ASP.NET?

Answer:
Session is used to store user-specific data across multiple requests during a user session.

Session("UserName") = "John" Dim name As String = Session("UserName").ToString()

18. What is the difference between Session and Application objects?

Answer:

  • Session: Data is stored per user.

  • Application: Data is shared across all users and sessions.

 

19. What is Caching in ASP.NET?

Answer:
Caching improves performance by storing data (e.g., page output, fragments, or data) so that future requests don’t need to recreate it.

Types of caching:

  • Output Caching

  • Fragment Caching

  • Data Caching

 

20. What is the difference between Authentication and Authorization?

Answer:

  • Authentication: Verifies who the user is (e.g., login)

  • Authorization: Determines what the authenticated user is allowed to do (permissions)

 

21. Q: What is ASP.NET?
A: ASP.NET is a web application framework developed by Microsoft to build dynamic web pages, websites, and web services. It runs on the .NET platform and allows coding in languages like VB.NET and C#.

22. Q: What is the difference between ASP.NET Web Forms and ASP.NET MVC?
A:

  • Web Forms use event-driven development and a drag-and-drop interface.

  • MVC (Model-View-Controller) separates concerns: Model for data, View for UI, and Controller for logic, making it more testable and suitable for large applications.

  • ​

23. Q: What is ViewState in ASP.NET?
A: ViewState is a method for preserving the values of controls between postbacks. It stores data in a hidden field on the page and is specific to the client session.

​

24. Q: What is a PostBack in ASP.NET?
A: A PostBack occurs when a web page sends data back to the same page on the server. This happens, for example, when a button is clicked and the server processes the input and reloads the page.

​

25. Q: What is the Global.asax file used for in ASP.NET?
A: The Global.asax file (also known as the ASP.NET application file) contains application-level event handlers like Application_Start, Session_Start, Application_Error, etc., used to control behavior of the application.

​​

ASP.NET Interview Questions and Answers

 "Deep Concepts to Elevate Your Career"

This guide provides 100+ ASP.NET interview questions along with in-depth concepts to strengthen your expertise.
bottom of page