Questions & Answers

ASP.NET Questions & Answers

Provides Latest and Useful Interview Q & A on ASP.NET technology

1. What is ASP.NET?

ASP.NET is a server-side technology used for developing dynamic websites and web applications on the internet. It also produces data-driven web applications.

2. What platform does ASP.NET use?

ASP.NET is a cross-platform which works on the .NET framework and runs on Linux, Windows, macOS, and Docker.

3. What is the ASP.NET Life Cycle, and list the types of Life Cycle?

When ASP.NET pages run, it goes through several steps of the life cycle, which performs a series of actions like initialization, running, restoring, and rendering

Life Cycle is classified into two categories.

  1. 1. Application Life Cycle: The user requests for accessing the application.
  2. 2. Page Life Cycle: Page Life Cycle has phases like initialization, restoring, execution, and page rendering.

4. What is MVC?

MVC is a software architectural pattern that divides an application into three main parts Model, View, and Controller.

Model:- Model helps to create the data domain of the application and represents the public properties and business logic of the application.

View:- View represents the data tables, charts, and diagrams by collecting the data from the model.

Controller:- The controller helps in handling the user interactions and controls the flow of the application.

5. List the languages used for ASP.NET

ASP.NET uses Object-Oriented programming languages that provide a framework and patterns, which are easy to use. Languages used by ASP.NET Framework are :

•C# C-Sharp is a programming language developed by Microsoft that runs on the .NET framework. It is used for developing web applications on the .NET framework.

•VB.NET VB.NET is a modern object-oriented programming language developed by Microsoft to combine the features of CLR and .NET.

6. What type of Library is used in ASP.NET?

A library is a pre-coded Object-Oriented Programming template collection used to develop web-based and desktop applications in ASP.NET.

ASP.NET uses a Web Library to develop web applications.

7. What is CLR?

CLR is the basic Common Language Runtime virtual machine component of the .NET framework used to run the code. It manages and executing .NET programs. And implements a Virtual Execution System (VES) internally.

services provided by CLR

8. What is IIS? And why do you use it?

Internet Information Server (IIS) is the most popular web server used to host and provide internet-based services to ASP.NET and ASP Web applications.

IIS has its own process engine to handle the requests. Using an IIS computer can work as a web server, and provides functionality to deploy ASP.NET Web applications. It is also responsible for providing responses to the requests made by the users.

9. List types of Application Life Cycle

Application Life Cycle is of five types:

10. List the advantages of using ASP.NET

ASP.NET is a development framework is used for developing web applications. It is one of the most preferred web development technologies at present.

There are a lot of benefits of using ASP.NET. Here are some advantages:

11. What is an Active Server Page?

Active Server Page is an HTML page used to develop dynamic web pages. It includes one or more scripts on the Microsoft web server before sending the request to the user.

12. Describe Web Forms?

Web forms are web pages that a user requests using a browser. It is built using ASP.NET technology.

13. What is a Solution Explorer?

Solution Explorer displays the folder and files of a project that appears on a physical hard drive.

14. List the components of ASP.NET.

ASP.NET provides data-driven web applications on the internet using various components.

15. What is the difference between ASP and ASP.NET?

ASP is the first server-side scripting language developed by Microsoft to design dynamic web forms
ASP.NET is a server-side technology used for developing dynamic websites and web applications on the internet

ASP is written in VBScript.
ASP.NET is written in C#.

16. What type of protocol is used to call web service?

Web service is a web-based functionality accessed by using protocols. It uses XML to exchange the software using common internet protocols.

The HTTP protocol is used in ASP.NET to call a Web Service.

17. Explain uses of Global.asax

Global.asax is used to handle high-level applications like Application_Start, Session_End, Session_Start

Global file is also used to execute the application-level events and set application-level variables.

18. What is a Web Library?

Web Library is a part of a website that accesses all libraries from the browser and helps in adding collections online.

19. Describe a View State?

View State is a Page-Level State Management technique that is used to preserve the values of the page and controls.

20. What is a Multi-View?

Multi-View is a parent control for the View. It is used to control all types of views.

21. What is Early Binding?

Early Binding is used to check the methods and properties during compilation. It is fast and easy to code and also reduces the compilation time. It also reduces the time by identifying the errors.

22. What is Late Binding?

Late Binding takes more time to compile. It is hard to find out the object through Late Binding. Late Binding has dynamic objects and is achieved by virtual machines.

23. How is ASP.NET different from ASP.NET Core?

ASP.NET is used to build applications for Windows, where ASP.NET Core is used for Windows, macOS, and Linux.

ASP.NET is used to build applications for windows.
ASP.NET coreis used for windows, mac OS and Linux.

24. What is Caching?

Caching is a technique used to sort the user data or information in memory. It boosts the performance of the applications and creates pages automatically.
Caching is also essential for data-related transactions.

25. What is the role of Page Directives?

Page directives describe the attributes of the specific page file for the compiler.

Attributes of Page Directives are:

26. What is a Trace?

Tracing enables view diagnostic information about a single request at runtime and debug the application.
The trace contains features, background, code examples, and class references.

27. How can a page layout help in ASP.NET?

Page layout provides an overall container for the pages on the website. For example, Navigation Area and Footer. Page layout also includes the main content.

28. List advantages of using HTML Server controls.

HTML Server Controls are the standard HTML controls used to enable server-side processing.

Some advantages of using HTML Server Controls are:

29. Explain about Event Bubbling?

Event bubbling is used by data-bound controls. When a parent control contains child controls, and when an event occurs in child controls, it bubbles the event to the parent; this is called Event bubbling.

Event Bubble is classified into two categories:

30. List the most common built-in objects of ASP.NET?

Built-in objects access the information from the webserver. It is also responsible for recognizing the client who is accessing the web page.

Some common built-in objects of ASP.NET are:

31. List types of Caching.

Caching is a technique used to sort the user data or information in memory.

Caching is divided into three types:-

32. What are Breakpoints?

A breakpoint helps to specify the runtime to run a line of a line and stop the execution. It is used to examine and perform various debugging functions and methods.

33. List five web controls in ASP.NET

Web Controls are HTML elements used for script tagging and functionality for web forms and pages. They are:

34. What are Button controls?

Button controls in ASP.NET are used to display a push button on a web page.

Buttons are divided into three types, they are:

35. What is a Range Validator and state its syntax?

Range validator checks the input values that lie in between the specified ranges.

Range Validator has three properties:

36. What is a Thread Priority?

In multithreading, each thread has its own priority that gains access to CPU resources; whenever a thread is created in C#, it always possesses some priority.

37. What is the role of Postback in ASP.NET?

Postback is a request sent from a client to the server from the page on which the user is working. It posts the complete page back to the server for a new page.
Postback is submitted to a server before processing the page and holds credentials such as verification like username and passwords using a database.

38. List the types of Authentication in ASP.NET?

Authentication is a process of ensuring the user identity

It is divided into four types:

  1. 1. Form Authentication
  2. 2. Windows Authentication
  3. 3. Custom Authentication
  4. 4. Passport Authentication

39. Define Web Configuration.

Web Configuration is used to describe the property and behaviour of web applications. It also helps to manage settings. Each file of a web configuration is an XML file that contains a set of configuration elements.

40. Explain Client-Side Script events

Client-Side Script runs on the browser and speeds up the execution of the page.

41.What is Anonymous Personalization?

Anonymous Personalization helps and allows the user to personalize the site before identifying themselves.

42. What is Form-Based Authentication?

Form-Based authentication is used to edit the web configuration files and add a login page to authenticate. It is used for web applications.
Form-based authentication also provides a way to handle authentication using custom logics in ASP.NET applications.

43.Define Configuration files?

Configuration files help to manage the settings of a website. Settings of configuration files are stored as XML files which are separate from the application.

Configuration files are two types:

44. List different types of cookies used in ASP.NET

Cookies are small pieces of information stored on the client side.

The cookies in ASP.NET are divided into two types:

45. Explain the difference between custom controls and user controls.

custom control is designed for a single application
user controlUser control is designed for multiple applications.
Custom control is loosely coupled.
User control is tightly coupled.

46. What are the advantages of ASP.NET?

ASP.Net is the next generation of ASP technology platform. It is superior to ASP in the following ways:

47. What is the used of "isPostBack" property?

The "IsPostBack" property of page object is used to check that the page is posted back or not.

48.What is the parent class of all web server control?

System.Web.UI.Control class

49. What is the difference between trace and debug?

Debug class is used to debug builds. Trace class is used for both debug and release builds.

50. What is the difference between globalization and localization?

Globalization: Globalization is a technique to identify the part of a Web application that is different for different languages and separate it out from the web application.

Localization: In localization, you try to configure a Web application so that it can be supported for a specific language or locale.

51. What is the difference between authentication and authorization?

Authentication is a process of identifying user whereas authorization is used to check the access rights of an identified user.

52. What are the differences between the Response.Write() and Response.Output.Write()?

Response.Write() is used for normal output whereas Response.Output.Write() is used for formatted output.

53. What are the built-in objects in ASP.NET?

The major built-in objects are given below:

54. What do you mean by Role-based security?

Role-based security is used in almost all organization, and the Role-based security assigns certain privileges to each role.

55. What is the default timeout for a cookie?

30 minutes.

56. Which protocol is used to call web service?

HTTP protocol.

57. What is the file extension of web service?

The File extension of web service is .asmx.

58. What is the use of Global.asax file?

The Global.asax file is used to execute the application-level events and sets application-level variables.

59.What is a multilingual website?

If a website provides content in many languages, it is known as a multilingual website. It contains multiple copies of its content and other resources, such as date and time, in different languages.

60. What is IIS?

IIS stands for Internet Information Services. It is created by Microsoft to provide Internet-based services to ASP.NET Web applications.