.NET WebDev interview questions
9. How will you identify which event in the ASP.NET Web page life cycle takes the longest time to execute? A. Turn on ASP.NET trace and run the Web application. B. Add a few code to each of the page life-cycle events that will print the current time. C. In the Web.config file, add the monitorTimings attribute and set it to True. D. In the Web site properties, turn on the performance monitor and run the Web application. After that, open performance monitor to see the timings.
11. You are interested in examining the data that is posted to the Web server. What trace result section can you use to see this information?A. Control Tree B. Headers Collection C. Form Collection D. Server Variables
12. While creating web site you need to add an HTML Web server control to the Web page, you need to drag an HTML element from the ToolBox of Visual Studio 2005 to the Web page and then which of the following tasks you will perform? A. Right-click the HTML element and click Run=Server. B. Double-click the HTML element to convert it to an HTML server control. C. Right-click the HTML element and click Run As Server Control. D. Click the HTML element and set ServerControl to true in the Properties window.
13. While testing your ASP.NET web application you noticed that while clicking on CheckBox of one of the web page it does not cause a PostBack; you required that the CheckBox should make PostBack so Web page can be update on the server-side code. How can you make the CheckBox to cause a PostBack? A. Set the AutoPostBack property to true. B. Add JavaScript code to call the ForcePostBack method. C. Set the PostBackAll property of the Web page to true. D. Add server-side code to listen for the click event from the client.
14. While writing code in Visual Studio 2005 you creates a new instance of a ASP.NET TextBox server control, what do you need to do to get the TextBox to display on the Web page? A. Call the ShowControl method on the TextBox. B. Set the VisibleControl to true on the TextBox. C. Add the TextBox instance to the form1.Controls collection. D. Execute the AddControl method on the Web page.
15. While creating your ASP.NET web based application you want to create multiple RadioButton server controls which should be mutually exclusive, what property of RadioButton server controls you must set? A. Exclusive B. MutuallyExclusive C. Grouped D. GroupName
16. While creating an ASP.NET web application with the help of Visual Studio 2005 you are creates a Web page that has several related buttons, such as fast-forward, reverse, play, stop, and pause. There should be one event handler that handles the processes of PostBack from these Button server controls. Other than the normal Submit button, what type of button can you create? A. OneToMany B. Command C. Reset D. ManyToOne
.NET interview: What is the difference between a Thread and Process?
A process is a collection of virtual memory space, code, data, and system resources. A thread is code that is to be serially executed within a process. A processor executes threads, not processes, so each application has at least one process, and a process always has at least one thread of execution, known as the primary thread. A process can have multiple threads in addition to the primary thread. Prior to the introduction of multiple threads of execution, applications were all designed to run on a single thread of execution.
When a thread begins to execute, it continues until it is killed or until it is interrupted by a thread with higher priority (by a user action or the kernel’s thread scheduler). Each thread can run separate sections of code, or multiple threads can execute the same section of code. Threads executing the same block of code maintain separate stacks. Each thread in a process shares that process’s global variables and resources.
Explain the concepts and capabilities of Assembly in .NET.
An assembly is a collection of files (dll’s, exe’s), group of resources that help in creating a logical unit of functionality. It forms the basic building block for deployment, reusability and security issues.
- It provides a CLR environment.
- It helps in maintaining security as it grants grant or denial of permissions.
- When an application starts only assemblies the application initially calls must be present.
- Assemblies can be either static or dynamic.
- Assemblies help in resolving versioning issues.
.NET interview: The concepts and capabilities of Assembly in .NET.
An assembly is a collection of files (dll’s, exe’s), group of resources that help in creating a logical unit of functionality. It forms the basic building block for deployment, reusability and security issues.
- It provides a CLR environment.
- It helps in maintaining security as it grants grant or denial of permissions.
- When an application starts only assemblies the application initially calls must be present.
- Assemblies can be either static or dynamic.
- Assemblies help in resolving versioning issues.
Interview Question :: garbage collector in .NET?
When should you call the garbage collector in .NET?
Garbage collection is a process of releasing the memory used by the objects, which are no longer referenced. This is done in different ways and different manners in various platforms and languages. We will see how garbage collection is being done in .NET.