Advanced asp.net interview questions and answers

What are assemblies?

- An Assembly is single entity which can be deploy and that contains all the details about the implementation of the classes, structures, interfaces. It is similar to DLL files.

- Assemblies have the classes and functions which can be reused.

- The details of Assembly are saved in it's METADATA which contains the name and version number of the assembly, security details, dependencies details and list of files by which the assembly is constituted.

- Namespaces are also saved in the assemblies.

- ASP.Net applications are deployed in the form of assemblies.

How can we use COM components in .Net?

The communication between the .Net components can be achieved with COM components using RCW called Runtime Callable Wrapper. We can use the RCW in the following ways.

- We can generate Wrapper class using Visual Studio and can place it in BIN directory.

- We can use the type library importer tool - Tlbimp.exe

- We can use the Interopservices. System.Runtime.Interopservices namespace provides TypeLib Converter that has methods to convert COM classes and interface in to assembly metadata.

- We can create our own custom wrappers.

What is Cross Page Posting? How is it done?

- By default, the form is submitted on the same page by ASP.Net.

- In cross-page posting, the form is submitted to another page.

- We can achieve this by giving the particular page url to the PostBackUrl property of a submit button.

- We can use the FindControl method of the PreviousPage property to fetch the details of the control of the first page in the code behind of the page of PostBackUrl.

What’s the difference between trace and debug in ASP.NET?

- The system.Diagnostics namespace contains the Debug and Trace classes for Tracing.

- The difference between Trace and Debug class is that when we use Debug class for tracing, it will work in builds which have the debug symbol defined. While when we use Trace class for tracing, it will work in builds which have the Trace symbol defined.

- System.Diagnostics.Trace.WriteLine namespace is used to trace when we want to work in debug and release builds, and System.Diagnostics.Debug.WriteLine namespace is used to trace when we want to work only in debug builds.

- Tracing is the process of gathering information related to the program's execution whereas Debugging is the process of searching & solving errors in the program.
ADO.NET Overview
ADO.NET Overview - ADO.NET is design to provide data access...
ADO.NET vs ADO
ADO.NET vs ADO - ADO.NET is considered as evolution version of ADO....
ADO.NET Data Architecture
ADO.NET Data Architecture - ADO.NET has four layers - The Physical Data Store: This can be any database, XML files or OLE....
Post your comment

You may like