ASP.NET Interview FAQ's
1. What is ASP.NET?
2. What advantages does ASP.NET have?
A: ASP.NET provides developers several advantages:
Separation of HTML and code: The layout of the page and the code for the page can be handled separately, allowing designers and programmers to collaborate with greater ease.
Supports compiled languages: Support for compiled languages ensure that programs run better and faster.
The .NET Framework: Microsoft provides the .NET framework containing class libraries that can be accessed by the program, making the coding process much simpler.
Graphical development: The development environment for ASP.NET is a rich GUI form, allowing programmers to work easily with features like drag and drop, property settings, etc. all on a visible interface apart from the codes.
State management: Session and application State Management solutions are given by the ASP.NET system. The State information can be stored in memory or in a database, can be shared and recovered if the server fails.
File updating in running server: ASP.NET allows parts of the application to be updated even with the server running and clients connected.
XML configuration files: Configuration settings of ASP.NET are stored as XML files which are easy to work with.
3. What is Validation in ASP.NET?
A: Validation is a system of checking the user inputs before they are layered into the application to ensure wrong data compromising the working of the application is not sent.
4. What is client side validation?
5. What is server side validation?
A: Validation done at the server is called server side validation. It is a more secure check than user side where errors are caught even if the user has bypassed client side validation.
6. What is meant by View State?
A: View State is a Page Level State Management procedure that preserves the Value of a Page and Control properties during round trips, that is sending request to server and return of page from the server.
7. What is meant by Caching in ASP.NET?
A: Caching is the process where the output that a page generates is stored in memory, and the saved output or cache allows the page being loaded faster the next time with only the required modifications being applied.
8. What is meant by MVC in ASP.NET?
9. What various Session State Management choices does ASP.NET provide?
A: Session states may be managed in ASP.NET in two ways:
1.In Process: The Session data is stored in the web server memory.
2.Out of Process: The Session data is stored in an external server which may be an SQL or State Server.
10. What do Cookies do in ASP.NET?
A: Cookies are small files sent from the server which are saved in the client’s computer by the browser. They are a State Management technique to store user specific information in the user’s system, enhancing webpage performance.
11. How are web config and machine config different?
A: Web config file is specific to the web application, while machine config is specific to the machine or the server. Thus, there may be many web config files for an application, but only a single machine config file for each server.
12. What is meant by Role Based Security?
A: Role Based Security is a system of allowing access to specific parts of the application to specific user groups only. Thus an Administrator has a greater access than a User, who in turn has a greater access than a Guest.
13. What is meant by Cross Page Posting?
A: Data is normally posted to the same page when the submit button is clicked in a webpage. Cross Page Posting is the method where the data is submitted to a different page when submit button is clicked in a webpage.
14. What are boxing and unboxing in ASP.NET?
A: Boxing is the assignment of a value type variable to a reference type variable, while unboxing is the exact opposite, assignment of a reference type variable to a value type variable.
15. What is the difference between strong typing and weak typing?
A: Strong Typing of the code means the variable data types are checked during compilation hence errors are avoided during runtime. Weak Typing of code checks the data types during runtime itself and hence can cause issues during runtime.
16. What cookies are used in ASP.NET?
A: Two types of cookies are used:
1.Session Cookie: Stays in the user’s system for a single session till the user logs out.
2.Persistent Cookie: Has a specific lifespan and exists in the user’s system for that time.
17. What is the role of AJAX in ASP.NET?
18. What are meant by Web Services in ASP.NET?
A: Web Services are software programs that use common protocols to exchange information with other softwares using XML.
19. What components does ADO.NET have?
A: ADO.NET components include Dataset, Data Adaptor, Data Reader, Connection, and Command.
20. What is the File Extension of Web Service?
A: The File Extension for Web Service is .asmx.
21. What protocol is used to call a Web Service?
A: The HTTP or Hypertext Transfer Protocol is used to call Web service.
22. What are the types of caching in ASP.NET?
A: Three kinds of caching are available:
23. How is an Event Handler added?
A: The Attributes property of Server Side Control is used to handle an event.
24. What is the base class for inheriting all Web Forms?
A: The Page class is the base class from which all Web Forms are inherited.
25. Can Web Services support a data reader?
A: No, Web Services support a dataset, but not a data reader.