Tweet
Hire Me on Freelancer.com
Protected by Copyscape Web Plagiarism Finder

Wednesday 24 October 2012

Mostly asked Asp.Net Interview Qusetion and Answers 3.5 , 4.0 - (Part 2)

Asp.net interview, .NET Interview Questions and Answers, asp.net interview questions, asp.net interview questions and answers, C# interview questions and answers, IIS interview questions and answers, sql server interview questions and answers, vb.net interview questions and answers, XML interview questions and answers, Asp.Net 3.5,Asp.Net 4.0,Asp.Net4.5, Asp.Net C#, VB.Net.



Simple Questions

1. What is IL? (What is MSIL or CIL, What is JIT?)
MSIL is the CPU –independent instruction set into which .Net framework programs are compiled. It contains instructions for loading, storing initializing, and calling methods on objects.

2. What is CLR?
Answer: CLR also known as Common Language Run time provides a environment in which program are executed, it activate object, perform security check on them, lay them out in the memory, execute them and garbage collect them.

3. What is CTS?
Answer: The common type system is a rich type system, built into the common language runtime, which supports the types and operations found in most programming languages.

4. What is CLS?
Answer: CLS also known as Common Language Specification defines the rules which all language must support, in order to be a part of .Net framework. The Common Language Specification is a set of constructs and constraints that serves as a guide for library writers and compiler writers. It allows libraries to be fully usable from any language supporting the CLS, and for those languages to integrate with each other. The Common Language Specification is a subset of the common type system. The Common Language Specification is also important to application developers who are writing code that will be used by other developers.

5. Which class does the web page belong to in ASP.Net?
Answer: System.Web.UI.Page

6. Which class deals with the user’s locale information?
Answer: System.Web.UI.Page.Culture

7. What data type does the RangeValidator control support?
Answer: Integer, Date and String.

8. What is the difference between Servers? Transfer and Response. Redirect?
Answer: Server.Transfer, transfers the control of a web page, posting a form data, while Response.Redirect simply redirects a page to another page, it cannot post a form data to another page. Server. Transfer is more efficient over the Response. Redirect, because Response. Redirect causes a round trip to serve as the page is processed once again on the client and a request is made to server thereafter.

9. Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
Answer: All the global declarations or the variables used commonly across the application can be deployed under Application_Start. All the user specific tasks or declarations can be dealt in the Session_Start subroutine.

10. What is view State?
Answer: View State is a .Net mechanism to store the posted data among post backs. View State allows the state of objects to be stored in a hidden field on the page, saved on client side and transported back to server whenever required.

11. What is the lifespan for items stored in View State?
Answer: Items stored in a View State exist for the life of the current page, including the post backs on the same page.

12. Can we disable View State, If, yes how?
Answer: View State can be disabled by using “EnableViewState” property set to false.

13. What’s a bubbled event?
Answer: When a complex control like data list or data grid, which contains a child control, using an item command can listen to the events raised by the child control in the main control. The process of listening to the child control in the main or parent control is called as event bubbling.

14. What is an assembly?
Answer: Assemblies are the building blocks of the .NET framework. They are the logical grouping of the functionality in a physical file.

15. What are different types of Assemblies?
Answer: Single file and multi file assembly. Assemblies can be static or dynamic. Private assemblies and shared assemblies

16. Which method do you invoke on the Data Adapter control to load your generated dataset with data?
Answer: Data Adapter’s fill () method is used to fill load the data in dataset.

17. Can you edit data in the Repeater control?
Answer: No, it just reads the information from its data source

18. Which template is to be provided in the Repeater control in order to display a data? Which template will display every other row in another color?
Answer: Item Template, AlternatingItemTemplate

19. What are the most important property and most important method of a Repeater control?
Answer: The Data Source property and Data Bind () method.

20. How many classes can a single .NET DLL contain?
Answer: It can contain many classes.

21. What are the advantages of an assembly?
Answer: Increased performance. Better code management and encapsulation. It also introduces the n-tier concepts and business logic.

22. What is the purpose of an Assembly?
Answer: An assembly controls many aspects of an application. The assembly handles versioning, type and class scope, security permissions, as well as other metadata including references to other assemblies and resources. The rules described in an assembly are enforced at runtime

23. What a static assembly consist of in general?
Answer: In general, a static assembly consists of the following four elements:

Assembly Manifest, which contains the assembly metadata.
Type Metadata.
MSIL code that implements the types.
A set of resources.
From above all only the manifest is required, however the other types and resources add the additional functionality to the assembly.

24. What is GAC or Global Assembly Cache?
Answer: Global Assembly Cache (GAC) is a common place to share the .NET assemblies across many applications. GAC caches all strong named assembly references within it. All System assemblies that come with the .NET framework reside in the GAC.

25. How to view an assembly?
Answer: We can use the tool “ildasm.exe” known as “Assembly Disassembler” to view the assembly.

26. What is Authentication and Authorization?
Answer: Authentication is the process of identifying users. Authentication is identifying/validating the user against the credentials (username and password) and Authorization performs after authentication. Authorization is the process of granting access to those users based on identity. Authorization allowing access of specific resource to user.

27. What are the types of Authentication? Describe.
Answer: There are 3 types of Authentication. Windows, Forms and Passport Authentication.

1.       Windows authentication uses the security features integrated into the Windows NT and Windows XP operating systems to authenticate and authorize Web application users.
2.       Forms authentication allows you to create your own list/database of users and validate the identity of those users when they visit your Web site.
3.       Passport authentication uses the Microsoft centralized authentication provider to identify users. Passport provides a way to for users to use a single identity across multiple Web applications. To use Passport authentication in your Web application, you must install the Passport SDK.

28. What are the types of comment in C#?
Answer: There are 3 types of comments in C#.
1.       Single line (//), Multi line (/* */) and Page Comments (///).

29. What is an Array List?
Answer: The Array List object is a collection of items containing a single data value.

30. What is a Hash Table?
Answer: The Hash table object contains items in key/value pairs. The keys are used as indexes, and very quick searches can be made for values by searching through their keys.

31. What is Sorted List?
Answer: The Sorted List object contains items in key/value pairs. A Sorted List object automatically sorts items in alphabetic or numeric order.

32. What is a Literal Control?
Answer: The Literal control is used to display text on a page. The text is programmable. This control does not let you apply styles to its content!

33. What is CAS or Code Access Security?
Answer: CAS is the part of the .NET security model that determines whether or not a piece of code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting a hard disk.

34. What is Side-by-Side Execution?
Answer: The CLR allows any versions of the same-shared DLL (shared assembly) to execute at the same time, on the same system, and even in the same process. This concept is known as side-by-side execution.

35. What are the different types of Caching?
Answer: There are three types of Caching:
2.       Output Caching: stores the responses from an asp.net page.
3.       Fragment Caching: Only caches/stores the portion of page (User Control)
4.       Data Caching: is Programmatic way to Cache objects for performance.

36. What are the different types of Validation Controls?
Answer: There are six types of validation controls available:

1.       RequiredFieldValidator
2.       RangeValidator
3.       RegularExpressionValidator
4.       CompareValidator
5.       CustomValidator
6.       § Validation Summary

37. How to Manage State in ASP.Net?
There are several ways to manage a state.

1.       View State
2.       Query String
3.       Cookies
4.       Session
5.       Application


38. What base class all Web Forms inherit from?
Answer: System.Web.UI.Page.

39. What method do you use to explicitly kill a user’s Session?
Answer: HttpContext.Current.Session.Abandon ().

40. What are the layouts of ASP.NET Pages?
Answer: Grid Layout and Flow Layout. Grid Layout positions the form object on absolute x and y co-ordinates of the screen. Flow Layout positions the form objects relative to each other.

41. What is the Web User Control?
Answer: Combines existing Server and HTML controls by using VS.Net. To create functional units that encapsulates some aspects of UI. Resides in Content Files, which must be included in project in which the controls are used.

42. What is the Composite Custom Control?
Answer: combination of existing HTML and Server Controls.

i will appreciate your comments and time for using my blog.
"Necessity is the mother of Invention"

No comments:

Post a Comment