TechieClues

ASP.NET - Interview Questions & Answers
1. What is ASP?
Active Server Pages (ASP), is a Microsoft's server-side technology, which helps in creating dynamic and user-friendly Web pages.
ASP is implemented through a dynamic-link library (asp.dll) that is called by the IIS server when a Web page is requested from the server.
2. What is ASP.NET?
ASP.NET is an open source server-side Web application framework designed for Web development to produce dynamic Web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, web applications and web services.
3. What are the different development models that ASP.NET supports ?
ASP.NET supports three different development models:
  • Web Pages
  • MVC (Model View Controller)
  • Web Forms
4. Explain briefly about ASP.NET Page life Cycle?
ASP.NET page passes through a series of steps during its life cycle.
  • Initialization: Controls raise their Init event in this stage.Objects and variables are initializes for complete lifecyle of request.
  • LoadViewState: is a post back stage and loads the view state for the controls that enabled its view state property.
  • LoadPostBackData: is also a post back stage and loads the data posted for the controls and update them.
  • Load: In this stage page as well as all the controls raise their Load event. Till this stage all the controls are initialized and loaded. In most of the cases, we are coding this event handler.
  • RaisePostBackEvent: Its again a postback stage. For example, it's raise against a button click event. We can easily put our code here to perform certain actions.
  • SaveViewState: Finally, controls state is saved in this stage before Rendering HTML.
  • Render: This is the stage where HTML is generated for the page.
  • Dispose: Lastly, all objects associated with the request are cleaned up.
5. What is Web forms in ASP.NET?
Web Forms are pages that users request using their browser. These pages can be written using a combination of HTML, client-script, server controls, and server code. When users request a page, it is compiled and executed on the server by the framework, and then the framework generates the HTML markup that the browser can render. An ASP.NET Web Forms page presents information to the user in any browser or client device.
6. What is MVC architecture in ASP.NET?
The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications.
The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc assembly.
7. What are the types of Authentication in ASP.NET?
There are three types of authentication available in ASP.NET:
  • Windows authentication: This authentication method uses built-in windows security features to authenticate user.
  • Passport authentication: Validates against Microsoft Passport service which is basically a centralized authentication service.
  • Forms authentication: Authenticate against a customized list of users or users in a database.
Questions & Answers
Dot Net Programming