Saturday, January 14, 2006

.NET, VB.NET, ASP.NET Questions with small hints:

Q. What is base class in .NET?

Hint: System.Object

Q. What is main difference between ASP and ASP.NET?

Hint: In ASP (i.e. classic one) scripts/code is not complied. ASP.NET come with nice feature code behind.

Q. Name some languages supported by .NET?

Hint: VB.NET, Visual J#, Visual C#, Visual C++

Q. What is assembly?

Hint: Deployment Units. Assemblies are similar to DLL files. Both have the reusable pieces of code in the form of classes/ functions. DLL needs to be registered but assemblies have its own metadata (i.e. includes name and version of the assembly, security information, information about the dependencies and the list of files that constitute the assembly).

Q. Difference between Panel and Group box?

Hint: Panel is scrollable. In panel you can’t set caption like Group box.

Q. What’s the difference between Response.Write() andResponse.Output.Write()?

Hint: Response.Output.Write() allows you to write formatted output.

Q. What is Delegate?

Hint: Delegate is like a pointer to a function in C++ or like an event handler in Java

You can use it to “multicast” which means running multiple functions in different instances of object already created.

This is useful when you want your objects to “register” to an event raised by another object.

The way it works is the object you are registered to listen to receive the delegate of the function it is supposed to run in your object, the delegate is then run from it. (If you switch the word delegate for pointer, this would be much simpler)

Q. What is serialization?

Hint: Serialization is when you persist the state of an object to a storage medium so an exact copy can be re-created at a later stage. Serialization is used to save session state in ASP.NET. Serialization is to copy objects to the Clipboard in Windows Forms Serialization is used by remoting to pass objects by value from one application domain to another.

Q. What is Viewstate?

Hint: Server control’s view state is the accumulation of all its property values. In order to preserve these values across HTTP requests, ASP.NET server controls use this property, which is an instance of the StateBag class, to store the property values.

Q. Where Viewstate is stored?

Hint: Viewstate is stored in the hidden field __VIEWSTATE.

Q. What is an Abstract class?

Hint: An abstract class is a special kind of class that cannot be instantiated. So the question is why we need a class that cannot be instantiated? An abstract class is only to be sub-classed (inherited from). In other words, it only allows other classes to inherit from it but cannot be instantiated. The advantage is that it enforces certain hierarchies for all the subclasses. In simple words, it is a kind of contract that forces all the subclasses to carry on the same hierarchies or standards.

Q. What is an Interface?

Hint: An interface is not a class. It is an entity that is defined by the word Interface. An interface has no implementation; it only has the signature or in other words, just the definition of the methods without the body. As one of the similarities to Abstract class, it is a contract that is used to define hierarchies for all subclasses or it defines specific set of methods and their arguments. The main difference between them is that a class can implement more than one interface but can only inherit from one abstract class

Q. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.

Hint: inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe.

Q. What’s a bubbled event?

Hint: When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.

Q. Explain the differences between Server-side and Client-side code?

Hint: Server-side code executes on the server. Client-side code executes in the client's browser.

1 comment:

KD said...

Dear nick5454,

Thanks for bombarding.

This blog deals with VB.NET and ASP.NET. So content available on this blog majorly deals with these two only. And as a Post heading these are only hints for questions not complete answers.

Please refer some good books, so blog viewers will take benefit by reading these books.

Regards.

Kuldeep.

Visitor Count: