|
.Net Technologies Interview Question
|
| 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. |
| What is CLR? |
| 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. |
| What is CTS? |
| 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 |
| What is CLS? |
| 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 |
| Which class
does the web page belong to in ASP.Net? |
| System.Web.UI.Page |
| Which class
deals wit the user’s locale information? |
| System.Web.UI.Page.Culture |
| What data
type does the RangeValidator control support? |
| Integer,
Date and String. |
| What is the
difference between Server.Transfer and Response.Redirect? |
| Server.Transfer,
transfers the control of a web page, posting a form data, while
Response.Redirect simply redirects a page to another page, it can not post a
form data to another page. Server.Transfer is more efficient over the
Response.Redirect, because Response.Redirect causes a round trip to server as
the page is processed once again on the client and a request is made to server
there after. |
| Can you give
an example of what might be best suited to place in the Application_Start and
Session_Start subroutines? |
| 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. |
| What is viewState? |
| ViewState
is a .Net mechanism to store the posted data among post backs. ViewState 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. |
| What is the
lifespan for items stored in ViewState? |
| Items
stored in a ViewState exist for the life of the current page, including the
post backs on the same page. |
| Can we disable
ViewState, If, yes how? |
| ViewState
can be disabled by using "EnableViewState" property set to false. |
| What’s a
bubbled event? |
| When
a complex control like datalist or datagrid, which contains a child control,
using an itemcommand 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. |
| What is an
assembly? |
| Assemblies
are the building blocks of the .NET framework. They are the logical grouping of
the functionality in a physical file. |
| What are
different types of Assemblies? |
| Single
file and multi file assembly. Assemblies can be static or dynamic. Private
assemblies and shared assemblies. |
| Which method
do you invoke on the DataAdapter control to load your generated dataset with
data? |
| DataAdapter’s
fill () method is used to fill load the data in dataset. |
| Can you edit
data in the Repeater control? |
| No,
it just reads the information from its data source. |
| 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? |
| ItemTemplate,
AlternatingItemTemplate |
| What are the
most important property and most important method of a Repeater control? |
| The
DataSource property and DataBind() method. |
| How many
classes can a single .NET DLL contain? |
| It
can contain many classes. |
| What are the
advantages of an assembly? |
| Increased
performance. Better code management and encapsulation. It also introduces the
n-tier concepts and business logic. |
| What is the
purpose of an Assembly? |
| 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. |
| What a static
assembly consist of in general? |
|
In
general, a static assembly consist 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.
|
| What is GAC
or Global Assembly Cache? |
| 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. |
| How to view an
assembly? |
| We
can use the tool "ildasm.exe" known as "Assembly Disassembler" to view the
assembly. |
| What is
Authentication and Authorization? |
| 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. |
| What are the
types of Authentication? Describe. |
|
are 3 types of Authentication. Windows, Forms and Passport Authentication.
Windows authentication uses the security features integrated into the Windows
NT and Windows XP operating systems to authenticate and authorize Web
application users.
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.
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. |
| What are the
types of comment in C#? |
There
are 3 types of comments in C#.
Single line (//), Multi line (/* */)and Page Comments (///). |
| What is an
ArrayList? |
| The
ArrayList object is a collection of items containing a single data value. |
| What is a
HashTable? |
| The
Hashtable 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. |
| What is
SortedList? |
| The
SortedList object contains items in key/value pairs. A SortedList object
automatically sorts items in alphabetic or numeric order. |
| What is a
Literal Control? |
| 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! |
| What is CAS
or Code Access Security? |
| 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. |
| What is
Side-by-Side Execution? |
| 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. |
| What are the
different types of Caching? |
|
There
are three types of Caching:
Output Caching: stores the responses from an asp.net page.
Fragment Caching: Only caches/stores the portion of page (User Control)
Data Caching: is Programmatic way to Cache objects for performance. |
| What are the
different types of Validation Controls? |
There
are six types of validation controls available:
-
RequiredFieldValidator
- Range Validator
- Regular ExpressionValidator
-
CompareValidator
-
CustomValidator
-
ValidationSummary
|
| How to
Manage State in ASP.Net? |
|
There
are several ways to manage a state.
ViewState
QueryString
Cookies
Session
Application |
| What base class all Web Forms
inherit from? |
| System.Web.UI.Page. |
| What method do you use to
explicitly kill a user’s Session? |
| HttpContext.Current.Session.Abandon(). |
| What are the
layouts of ASP.NET Pages? |
| GridLayout
and FlowLayout. GridLayout positions the form object on absolute x and y
co-ordinates of the screen. FlowLayout positions the form objects relative to
each other. |
| What is the
Web User Control? |
| Combines
existing Server and HTML controls by using VS.Net. to create functional units
that encapsulate some aspects of UI. Resides in Content Files, which must be
included in project in which the controls are used. |
| What is the
Composite Custom Control? |
| combination
of existing HTML and Server Controls. |
|
|