ASP.NET is a server-side web application framework developed by Microsoft, designed to create dynamic web pages, web applications, and services. In tech interviews, questions about ASP.NET assess a candidate’s knowledge on the .NET framework, understanding of web development principles, familiarity with database connectivity, and ability to handle server-side programming effectively. Providing real world solutions to complex web application challenges will showcase both your theoretical knowledge and practical experience in using ASP.NET.
ASP.NET Fundamentals
- 1.
What is ASP.NET and how does it differ from classic ASP?
Answer:Active Server Pages (ASP) and ASP.NET are web application frameworks from Microsoft, each with its unique characteristics and features.
Commonalities
- Serve as a middleware between web servers and dynamic web content.
- Use server-side languages for dynamic content generation and database interaction.
- Facilitate creation of interactive interfaces and sophisticated web applications.
Key Features
Classic ASP
- Code Execution: Relies on an interpreter for languages like VBScript or JScript.
- Performance Monitoring: Lacks built-in mechanisms for performance tracking.
- Multilanguage Support: Limited to languages supported by the scripting engines.
- Object Model: Employs a limited set of objects such as
RequestandResponsefor web-related tasks. - Data Handling: Requires direct interaction with ADO (ActiveX Data Objects).
- Security: Prone to potential vulnerabilities such as SQL injection.
ASP.NET
- Code Execution: Translates high-level languages like C# or Visual Basic into an intermediate language (IL) that’s executed by the .NET Common Language Runtime (CLR).
- Performance Monitoring: Offers rich tools like Application Insights for real-time monitoring and diagnostics.
- Multilanguage Support: Comprehensive support for all languages in the .NET ecosystem.
- Object Model: Employs a rich set of classes in the .NET Framework, enabling modular, object-oriented development.
- Data Handling: Simplifies data access with technologies like Entity Framework and LINQ.
- Security: Integrates with ASP.NET Identity, mitigating common security risks.
- 2.
Describe the ASP.NET page life cycle.
Answer: - 3.
What are the different types of state management in ASP.NET?
Answer: - 4.
Explain the difference between server-side and client-side code.
Answer: - 5.
What is a PostBack in ASP.NET?
Answer: - 6.
What are WebForms in ASP.NET?
Answer: - 7.
What is MVC in ASP.NET and how does it work?
Answer: - 8.
Describe the role of a master page in ASP.NET WebForms.
Answer: - 9.
What is a web.config file and what are its uses?
Answer: - 10.
Explain the concept of ViewState in ASP.NET.
Answer:
ASP.NET Controls
- 11.
What is a server control in ASP.NET?
Answer: - 12.
What are user controls and custom controls?
Answer: - 13.
Explain how to create a custom control in ASP.NET.
Answer: - 14.
What are validation controls in ASP.NET?
Answer: - 15.
Describe the different types of validation controls available in ASP.NET.
Answer: