ASP.NET Flashcards

1
Q

ASP.NET

What are the namespace available in .net?

A

Namespace is a logical grouping of class.

■System
■System.Data
■System.IO
■System.Drawing
■System.Windows.Forms
■System.Threading
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ASP.NET

What are the two main parts of the .NET Framework?

A

There are the two main parts of the .NET Framework are :

■The common language runtime (CLR). 
■The .NET Framework class library.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ASP.NET

Describe the compilation process for .NET code?

A

Source code is compiled and run in the .NET Framework using a two-stage process. First, source code is compiled to Microsoft intermediate language (MSIL) code using a .NET Framework-compatible compiler, such as that for Visual Basic .NET or Visual C#. Second, MSIL code is compiled to native code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ASP.NET

How do you create threading in .NET? What is the namespace for that?

A

System.Threading.Thread

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between static or dynamic assemblies?

A

Assemblies can be static or dynamic.
Static assemblies :

can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on).Staticassemblies are stored on disk in portable executable (PE) files.

Dynamic assemblies :
which are run directly from memory and are not saved to disk before execution.

You can save dynamic assemblies to disk after they have executed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How many languages .NET is supporting now?

A

When .NET was introduced it came with several languages. VB.NET, C#, COBOL and Perl, etc. 44 languages are supported.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How many .NET languages can a single .NET DLL contain?

A

Many

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is metadata?

A

Metadata means data about the data i.e., machine-readable information about a resource, . Such information might include details on content, format, size, or other characteristics of a data source. In .NET, metadata includes type definitions, version information, external assembly references, and other standardized information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How many types of Transactions are there in COM + .NET ?

A

There are 5 transactions types that can be used with COM+.

■Disabled
■Not Supported
■Supported
■Required
■Required New
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How many namespaces are in .NET version 1.1?

A

124

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the root class in .Net?

A

system.object is the root class in .net .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is managed code execution?

A

The .Net framework loads and executes the .Net applications, and manages the state of objects during program execution. This also provides automatically garbage collections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the strong name in .net assembly?

A

■Strong Name is similar to GUID (It is supposed to be unique in space and time).

■In COM components. Strong name is only needed when we need to deploy assembly in GAC.

■Strong names use public key cryptography (PKC) to ensure that no one can spoof it. PKC use public key and private key concept. Following are the step to generate a strong name and sign an assembly:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the assembly entry points?

A

An assembly can have only one entry point from DllMain, WinMain or Main.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are remotable objects in .NET Remoting?

A

.NET Remoting is a mechanism for communicating between objects which are not in the same process. It is a generic system for different applications to communicate with one another. .NET objects are exposed to remote processes, thus allowing inter process communication. The applications can be located on the same computer, different computers on the same network, or on computers across separate networks.

Microsoft .NET Remoting provides a framework that allows objects to interact with each other across application domains. Remoting was designed in such a way that it hides the most difficult aspects like managing connections, marshaling data, and reading and writing XML and SOAP. The framework provides a number of services, including object activation and object lifetime support, as well as communication channels which are responsible for transporting messages to and from remote applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ASP.NET

What namespaces are necessary to create a localized application?

A

■System.Globalization

■System.Resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

ASP.NET

Which namespaces are used for data access?

A

■System.Data
■System.Data.OleDB
■System.Data.SQLClient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

ASP.NET

What is a SESSION and APPLICATION object?

A

Session object store information between HTTP requests for a particular user.
Session variables are used to store user specific information where as in application variables we can’t store user specific information.
while application object are global across users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is ASP.NET?

A

ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.

ASP.NET provides increased performance by running compiled code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the difference between Classic ASP and ASP.Net?

A

ASP is Interpreted language based on scripting languages like Jscript or VBScript.

■ASP has Mixed HTML and coding logic.
■Limited development and debugging tools available.
■Limited OOPS support.
■Limited session and application state management.

ASP.Net is supported by compiler and has compiled language support.

■Separate code and design logic possible.
■Variety of compilers and tools available including the Visual studio.Net.
■Completely Object Oriented.
■Complete session and application state management.
■Full XML Support for easy data exchange.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

ASP.NET

What is Difference between Namespace and Assembly?

A

A namespace is just a grouping of related classes. It’s a method of putting classes inside a container so that they can be clearly distinguished from other classes with the same name.The physical grouping is accomplished by an assembly, which equates most directly to a dynamic link library (DLL), COM object, or OCX module.
The .NET CLR contains multiple namespaces, which are spread across many assemblies. For example, ADO.NET is the set of classes located in the System.Data namespace, and ASP.NET is the set of classes located in the System.Web namespace.
In Visual Studio .NET, code is physically organized and structured in assemblies. An assembly is almost identical to a DLL, although one assembly consists of one or more DLL or EXEs.
one assembly can contain one or more namespaces, and one namespace can be contained by one or more assemblies. Each assembly can be configured with a root namespace. If the root namespace value is left blank, the root namespace value defaults to the assembly name.

Differences:

1) A namespace is logically groups classes.An assembly is physical grouping of logical units.
2) An Assembly contains one or more namespaces.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

ASP.NET

What is the difference between early binding and late binding?

A

Calling a non-virtual method, decided at a compile time is known as early binding. Calling a virtual method (Pure Polymorphism), decided at a runtime is known as late binding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

ASP.NET

What is the difference between ASP Session State and ASP.Net Session State?

A

ASP session state relies on cookies, Serialize all requests from a client, does not survive process shutdown, Can not maintained across machines in a Web farm.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the difference between ASP Session and ASP.NET Session?

A

Asp.net session supports cookie less session & it can span across multiple servers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

ASP.NET

What is reflection?

A

All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection.
The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

ASP.NET

What is the difference between Server.Transfer and response.Redirect?

A

The Server.Transfer () method stops the current page from executing, and runs the content on the specified page, when the execution is complete the control is passed back to the calling page.
While the Response.Redirect () method transfers the control on the specified page and the control is never passed back to calling page after execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

ASP.NET

What is a PostBack?

A

The process in which a Web page sends data back to the same page on the server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What namespace does the Web page belong in the .NET Framework class hierarchy?

A

System.Web.UI.Page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

ASP.NET

What’s a bubbled event?

A

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 event handlers, allowing the main DataGrid event handler to take care of its constituents.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

ASP.NET

What is the differences between Server-side and Client-side code?

A

■Server-side code executes on the server.

■Client-side code executes in the client’s browser.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

ASP.NET

What is the difference between static or dynamic assemblies?

A

Assemblies can be static or dynamic.

Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files.

Dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

ASP.NET

What are the difference between Structure and Class?

A

■Structures are value type and Classes are reference type

■Structures can not have constructor or destructors.

■Classes can have both constructor and destructors.
■Structures do not support Inheritance, while Classes support Inheritance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

ASP.NET

What is the differences between dataset.clone and dataset.copy?

A

Dataset.clone copies just the structure of dataset (including all the datatables, schemas, relations and constraints.); however it doesn’t copy the data.
Dataset.copy, copies both the dataset structure and the data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

ASP.NET

What is the difference between Custom Control and User Control?

A

Custom Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in toolbox. Drag and Drop controls. Attributes can be set visually at design time. Can be used by Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of web application add reference and use. Normally designed to provide common functionality independent of consuming Application.
User Controls are similar to those of ASP include files, easy to create, can not be placed in the toolbox and dragged - dropped from it. A User Control is shared among the single application files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What is the difference between ASP Session State and ASP.Net Session State?

A

ASP session state relies on cookies, Serialize all requests from a client, does not survive process shutdown, Can not maintained across machines in a Web farm.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

ASP.NET

What is ViewState?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

ASP.NET

What is Authentication and Authorization?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

ASP.NET

What are the types of Authentication?

A

There 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

ASP.NET

What are the different types of Validation Controls?

A

There are six types of validation controls available :

■RequiredFieldValidator 
■RangeValidator
■RegularExpressionValidator
■CompareValidator
■CustomValidator
■ValidationSummary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

ASP.NET

What is the Web User Control?

A

Combines existing Server and/or 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

ASP.NET

What namespaces are necessary to create a localized application?

A

■System.Globalization

■System.Resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

How to Manage State in ASP.Net?

A

There are several ways to manage a state.

■ViewState
■ QueryString
■Cookies
■Session
■Application
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

ASP.NET

What are the different types of Caching?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

ASP.NET

What is Side-by-Side Execution?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

ASP.NET

How to view an assembly?

A

We can use the tool “ildasm.exe” known as “Assembly Disassembler” to view the assembly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

ASP.NET

Which are the namespaces that are imported automatically by Visual Studio in ASP.Net?

A
There are 7 namespaces which are imported automatically.
 ■System
■System.Collections
■System.IO
■System.web
■System.web.UI
■System.web.UI.HTMLControls
■System.web.UI.WebControls.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What are the layouts of ASP.NET Pages?

A

■GridLayout
■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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

ASP.NET

What is Delegates?

A

Delegates are a type-safe, object-oriented implementation of function pointers and are used in many situations where a component needs to call back to the component that is using it. Delegates are generally used as basis of events, which allow any delegate to easily be registered for as event.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

ASP.NET

What is a Namespace? What is the use of a namespace?

A

Namespaces are logical grouping of classes and other types in hierarchical structure.
Namespaces are useful to avoid collision or ambiguity among the classes and type names.
Another use of the namespace is to arrange a group of classes for a specific purpose.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

ASP.NET

What’s the difference between Codebehind=”MyCode.aspx.cs” and Src=”MyCode.aspx.cs”?

A

Visual Studio uses the Codebehind attribute to distinguish the page source or programming logic from the design. Also the src attribute will make the page compile on every request. That is the page will not be compiled in advance and stored in the bin as a dll instead it will be compiled at run time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

ASP.NET

What is datagrid?

A

The DataGrid Web server control is a powerful tool for displaying information from a data source. It is easy to use; you can display editable data in a professional-looking grid by setting only a few properties. At the same time, the grid has a sophisticated object model that provides you with great flexibility in how you display the data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

ASP.NET

How do you hide the columns?

A

One way to have columns appear dynamically is to create them at design time, and then to hide or show them as needed. You can do this by setting a column’s “Visible” property.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

ASP.NET

What are different types of directives in .NET?

A
■@Page
■@Control
■@Import
■@Implements
■@Register
■@Assembly
■@OutputCache
■@Reference
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

ASP.NET

What data type does the RangeValidator control support?

A

■Integer
■String.
■Date.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

ASP.NET

What is cookies?

A

Cookies are small pieces of text, stored on the client’s computer to be used only by the website setting the cookies. This allows webapplications to save information for the user, and then re-use it on each page if needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

ASP.NET

How many classes can a single .NET DLL contain?

A

It can contain many classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

ASP.NET

What methods are fired during the page load?

A

Init() - when the page is instantiated.

Load() - when the page is loaded into server memory.

PreRender() - the brief moment before the page is displayed to the user as HTML.

Unload() - when page finishes loading.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

ASP.NET

What is the difference between Value Types and Reference Types?\

A

Value Types uses Stack to store the data.

where as Reference type uses the Heap to store the data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

ASP.NET

What is the difference between Server-side scripting and Client-side scripting?

A

Server side scripting means that all the script will be executed by the server and interpreted as needed. ASP doesn’t have some of the functionality like sockets, uploading, etc.
Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

ASP.NET

How do you create a permanent cookie?

A

Permanent cookies are available until a specified expiration date, and are stored on the hard disk.So Set the ‘Expires’ property any value greater than DataTime.MinValue with respect to the current datetime. If u want the cookie which never expires set its Expires property equal to DateTime.maxValue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

ASP.NET

Which method do you use to redirect the user to another page without performing a round trip to the client?

A

Server.Transfer

Server.Execute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

ASP.NET

Which method do you use to redirect the user to another page without performing a round trip to the client?

A

Server.transfer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

ASP.NET

What tag do you use to add a hyperlink column to the DataGrid?

A

< asp:HyperLinkColumn > < / asp:HyperLinkColumn >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

ASP.NET

What is web.config file?

A

Web.config file is the configuration file for the Asp.net web application. There is one web.config file for one asp.net application which configures the particular application. Web.config file is written in XML with specific tags having specific meanings.It includes databa which includes connections,Session States,Error Handling,Security etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

ASP.NET

What is the difference between in-proc and out-of-proc?

A

An Inproc is one which runs in the same process area as that of the client giving tha advantage of speed but the disadvantage of stability becoz if it crashes it takes the client application also with it.
Outproc is one which works outside the clients memory thus giving stability to the client, but we have to compromise a bit on speed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

ASP.NET

What is smart navigation?

A

The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

How do you validate the controls in an ASP .NET page?

A

Using special validation controls that are meant for this. We have Range Validator, Email Validator

68
Q

ASP.NET

How do you turn off cookies for one page in your site?

A

Use Cookie.Discard property, Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the user’s hard disk when a session ends.

69
Q

ASP.NET

Which two properties are on every validation control?

A

We have two common properties for every validation controls:

■ Control to Validate
■ Error Message

70
Q

ASP.NET

Which control would you use if you needed to make sure the values in two different controls matched?

A

CompareValidator is used to ensure that two fields are identical.

71
Q

ASP.NET

What is the difference between HTTP-Post and HTTP-Get?

A

The GET method creates a query string and appends it to the script’s URL on the server that handles the request.
The POST method creates a name/value pairs that are passed in the body of the HTTP request message.

72
Q

ASP.NET

What is strong-typing versus weak-typing?

A

Strong typing implies that the types of variables involved in operations are associated to the variable, checked at compile-time, and require explicit conversion
Weak typing implies that they are associated to the value, checked at run-time, and are implicitly converted as required.

73
Q

ASP.NET

What is boxing and unboxing?

A

Implicit conversion of value type to reference type of a variable is known as BOXING, for example integer to object type conversion.
Conversion of reference type variable back to value type is called as UnBoxing.

74
Q

ASP.NET

What is garbage collection?

A

Garbage collection is a system whereby a run-time component takes responsibility for managing the lifetime of objects and the heap memory that they occupy.

75
Q

ASP.NET

What is serialization?

A

Serialization is the process of converting an object into a stream of bytes.
Deserialization is the opposite process of creating an object from a stream of bytes. Serialization / Deserialization is mostly used to transport objects.

76
Q

ASP.NET

What is the differnce between Managed code and unmanaged code?

A

Managed Code: Code that runs under a “contract of cooperation” with the common language runtime. Managed code must supply the metadata necessary for the runtimeto provide services such as memory management, cross-language integration, code access security, and automatic lifetime control of objects. All code based on Microsoft intermediate language (MSIL) executes as managed code.

Un-Managed Code:Code that is created without regard for the conventions and requirements of the common language runtime. Unmanaged code executes in the common language runtime environment with minimal services (for example, no garbage collection, limited debugging, and so on).

77
Q

ASP.NET

What is difference between constants, readonly and, static?

A

■Constants: The value can’t be changed.

■Read-only: The value will be initialized only once from the constructor of the class.
■Static: Value can be initialized once.

78
Q

ASP.NET

What is namespace used for loading assemblies at run time and name the methods?

A

System.Reflection

79
Q

ASP.NET

How big is the datatype int in .NET?

A

32 BITS

80
Q

ASP.NET

What is difference between abstract classes and interfaces?

A

Abstract classes can have concrete methods while interfaces have no methods implemented.
Interfaces do not come in inheriting chain, while abstract classes come in inheritance.

81
Q

ASP.NET

Which event are the controls fully loaded?

A

Page_load event guarantees that all controls are fully loaded. Controls are also accessed.
In Page_Init events but you will see that viewstate is not fully loaded during this event.

82
Q

ASP.NET

What is the use of @ Register directives?

A

@Register directive informs the compiler of any custom server control added to the page.

83
Q

ASP.NET

Define RequiredFieldValidator?

A

It checks whether the control have any value. It’s used when you want the control should not be empty.

84
Q

ASP.NET

What are the different types of Session state management options available with ASP.NET?

A

ASP.NET provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server. Out-of-Process Session state management stores data in an external data source. The external data source may be either a SQL Server or a State Server service. Out-of-Process state management requires that all objects stored in session are serializable.

85
Q

ASP.NET

What are the difference between const and readonly?

A

■A const can not be static, while readonly can be static.
■A const need to be declared and initialized at declaration only, while a readonly can be initialized at declaration or by the code in the constructor.
■A const’s value is evaluated at design time, while a readonly’s value is evaluated at runtime.

86
Q

ASP.NET

How do you turn off cookies in one page of your asp.net application?

A

We may not use them at the max, However to allow the cookies or not, is client side functionality.

87
Q

ASP.NET

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

A

Response.Outout.Write allows us to write the formatted out put.

88
Q

ASP.NET

What is the difference between inline and code behind?

A

Inline code written along with the html and design blocks in an .aspx page.
Code-behind is code written in a separate file (.cs or .vb) and referenced by the .aspx page.

89
Q

ASP.NET

What is the difference between early binding and late binding?

A

Calling a non-virtual method, decided at a compile time is known as early binding.
Calling a virtual method (Pure Polymorphism), decided at a runtime is known as late binding.

90
Q

ASP.NET

What is the difference between ASP Session and ASP.NET Session?

A

Asp.net session supports cookie less session & it can span across multiple servers.

91
Q

ASP.NET

What is Common Language Runtime?

A

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.

92
Q

ASP.NET

What is Intermediate Language?

A

MSIL are also known as Microsoft Intermediate Language 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.

93
Q

ASP.NET

What is CTS?

A

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.

94
Q

ASP.NET

What is Common Langauge Specification?

A

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.

95
Q

ASP.NET

What is the lifespan for items stored in ViewState?

A

Items stored in a ViewState exist for the life of the current page, including the post backs on the same page.

96
Q

ASP.NET

Can we disable ViewState, If, yes how?

A

ViewState can be disabled by using “EnableViewState” property set to false.

97
Q

ASP.NET

Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?

A

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.

98
Q

ASP.NET

What is an assembly?

A

Assemblies are the building blocks of the .NET framework. They are the logical grouping of the functionality in a physical file.

99
Q

ASP.NET

What are different types of Assemblies?

A

■Single file and multi file assembly.
■ Assemblies can be static or dynamic.
■Private assemblies and shared assemblies.

100
Q

ASP.NET

Which method do you invoke on the DataAdapter control to load your generated dataset with data?

A

DataAdapter’s fill () method is used to fill load the data in dataset.

101
Q

ASP.NET

Which template is to be provided in the Repeater control in order to display a data?

A

■ItemTemplate

■ AlternatingItemTemplate.

102
Q

ASP.NET

What are the advantages of an assembly?

A

■Increased performance.
■ Better code management and encapsulation.
■It also introduces the n-tier concepts and business logic.

103
Q

ASP.NET

What is an ArrayList?

A

The ArrayList object is a collection of items containing a single data type values.

104
Q

ASP.NET

What is a Literal Control?

A

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.

105
Q

ASP.NET

Which namespaces are used for data access?

A

■System.Data
■System.Data.OleDB
■System.Data.SQLClient

106
Q

ASP.NET

What is Remoting?

A

Remoting is a means by which one operating system process, or program, can communicate with another process. The two processes can exist on the same computer or on two computers connected by a LAN or the Internet.

107
Q

What’s the use of “GLOBAL.ASAX” file?

A

It allows to executing ASP.NET application level events and setting application-level variables.

108
Q

ASP.NET

t is a SESSION and APPLICATION object?

A

Session object store information between HTTP requests for a particular user.
Session variables are used to store user specific information where as in application variables we can’t store user specific information.
while application object are global across users.

109
Q

ASP.NET

What is the difference between a Thread and a Process?

A

A thread is a path of execution that run on CPU, a proccess is a collection of threads that share the same virtual memory.
A process have at least one thread of execution, and a thread always run in a process context.

110
Q
ASP.NET
What's the difference between the Debug class and Trace class?
A
■Documentation looks the same. 
■Use Debug class for debug builds.
■ use Trace class for both debug and release builds.
111
Q
ASP.NET
What’s the top .NET class that everything is derived from?
A

System.Object

112
Q

ASP.NET

How is method overriding different from overloading?

A

When Overriding, you change the method behavior for a derived class.
Overloading simply involves having a method with the same name within the class.

113
Q

ASP.NET

What is the difference between System.String and System.StringBuilder classes?

A

■System.String is immutable.
■ System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

114
Q

ASP.NET

hat is the differences between Server-side and Clientside code?

A

■Server side code is executed at the server side on IIS in ASP.NET framework.
■ while client side code is executed on the browser.

115
Q

ASP.NET

What’s an interface?

A

It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes.

116
Q

ASP.NET

What is a formatter?

A

A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.

117
Q

ASP.NET

What is Marshalling?

A

Marshaling is a process of making an object in one process (the server) available to another process (the client). There are two ways to achieve the marshalling.■Marshal by value
■Marshal by reference.

118
Q

ASP.NET

What is a Static class?

A

Static class is a class which can be used or accessed without creating an instance of the class.

119
Q

ASP.NET

What is a DataSet?

A

A DataSet is an in memory representation of data loaded from any data source.

120
Q

ASP.NET

What is a DataTable?

A

A DataTable is a class in .NET Framework and in simple words a DataTable object represents a table from a database.

121
Q

What is a life span of a static variable?

A

A static variable’s life span is till the class is in memory

122
Q

What is the difference between an abstract method & virtual method?

A
An Abstract method does not provide an implementation and forces overriding to the deriving class (unless the deriving class also an abstract class), 
Virtual method has an implementation and leaves an option to override it in the deriving class. Thus Virtual method has an implementation & provides the derived class with the option of overriding it. Abstract method does not provide an implementation & forces the derived class to override the method.
123
Q

ASP.NET

What is sealed class

A
■Sealed classes are those classes which can not be inherited and thus any sealed class member can not be derived in any other class.
■ A sealed class cannot also be an abstract class.
124
Q

ASP.NET

What are the components of web form in ASP.NET?

A

erver controls
■HTML controls
■Data controls
■System components.

125
Q

ASP.NET

How do you turn off cookies for one page in your site?

A

Use the Cookie. Discard Property which Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the users hard disk when a session ends.

126
Q

ASP.NET

What is AutoPostback?

A

AutoPostBack automatically posts the page back to the server when state of the control is changed.

127
Q

ASP.NET

What is Globalization?

A

Globalization is the process of creating multilingual application by defining culture specific features like currency, date and time format, calendar and other issues.

128
Q

ASP.NET

What is the main difference between Asp.net and Vb.net?

A

■Asp.net is a web technology used for designing webforms and Vb.net is a programming language

■ASP.NET is a powerful technology for writing dynamic web pages.

■ASP.NET is a way of creating dynamic web pages while making use of the innovations present in .NET.

■VB.NET is a language.But ASP.NET is the Environment where we can create websites or webpages.

129
Q

ASP.NET

Is string a value type or a reference type?

A

Srting is a Reference type.It can create a new instance at every time.

130
Q
ASP.NET
What base class do all Web Forms inherit from?
A

System.web.UI.Page class

131
Q

ASP.NET

What does assert () do?

A

In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.

132
Q

ASP.NET

What is cookie less session? How it works?

A

By default, ASP.NET will store the session state in the same process that processes the request, just as ASP does. If cookies are not available, a session can be tracked by adding a session identifier to the URL.

133
Q

ASP.NET

What is the difference between Compiler and Interpreter?

A

Compiler:
A compiler is a program that translates program (called source code) written in some high level language into object code.A compiler translates high-level instructions directly into machine language and this process is called compiling.
Interpreter:
An interpreter translates high-level instructions into an intermediate form, which it then executes. Interpreter analyzes and executes each line of source code in succession, without looking at the entire program; the advantage of interpreters is that they can execute a program immediately.

134
Q

ASP.NET

What is the difference between an ADO.NET Dataset and an ADO Recordset?

A

A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.

■A DataSet is designed to work without any continuing connection to the original data source.

■ DataSets have no current record pointer You can use For Each loops to move through the data.

■Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.

■ Data in a DataSet is bulk-loaded, rather than being loaded on demand.

■ You can store many edits in a DataSet, and write them to the original data source in a single operation.

135
Q

ASP.NET

What are the validation controls?

A

A set of server controls included with ASP.NET that test user input in HTML and Web server controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation controls can also perform validation using client script.

136
Q

ASP.NET

What is the difference between “Web.config” and “Machine.Config”?

A

■“Web.config” files apply settings to each web application.

■While “Machine.config” file apply settings to all ASP.NET applications.

137
Q

ASP.NET

What is event bubbling?

A

Server controls like Data grid, Data List, and Repeater can have other child controls inside them. Example Data Grid can have combo box inside data grid. These child control do not raise there events by themselves, rather they pass the event to the container parent (which can be a data grid, data list, repeater), which passed to the page as “ItemCommand” event. As the child control send events to parent it is termed as event bubbling.

138
Q

ASP.NET

What is the use of @ Register directives?

A

@Register directive informs the compiler of any custom server control added to the page.

139
Q

ASP.NET

Where is View State information stored?

A

In HTML Hidden Fields.

140
Q

ASP.NET

What is role based security?

A

By default, ASP.NET will store the session state in the same process that processes the request, just as ASP does. If cookies are not available, a session can be tracked by adding a session identifier to the URL.

141
Q

ASP.NET

What is the difference between Asp and Asp.net?

A

ASP (Active Server Pages) and ASP.NET are both server side technologies for building web sites and web applications, ASP.NET is Managed compiled code - asp is interpreted. and ASP.net is fully Object oriented.
ASP.NET has been entirely re-architected to provide a highly productive programming experience based on the .NET Framework, and a robust infrastructure for building reliable and scalable web applications.

142
Q

ASP.NET

What are the various security methods which IIS Provides apart from .NET?

A

The various security methods which IIS provides are :

■ Authentication Modes.
■IP Address and Domain Name Restriction.
■ DNS Lookups DNS Lookups.
■Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.
■ The Network ID and Subnet Mask.
■ SSL.
143
Q

What are Master Pages in ASP.NET?

A

ASP.NET master pages allow you to create a consistent layout for the pages in your application. A single master page defines the look and feel and standard behavior that you want for all of the pages in your application. You can then create individual content pages that contain the content you want to display. When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the content page.

144
Q

What are the advantages of ASP.Net?

A

■ASP.NET makes development simpler and easier to maintain with an event-driven, server-side programming model.

■ASP.NET offers built-in security features through windows authentication or other authentication methods.

■Content and program logic are separated which reduces the inconveniences of program maintenance.

■Built-in caching features.

145
Q

ASP.NET

What is WSDL?

A

DL stands for Web Services Description Language is an XML-based language for describing Web services and how to access them.
WSDL is used to describe Web services.

146
Q

ASP.NET

What is the difference between javascript and vbscript?

A

Javascript :
JavaScript is a client-side scripting language.
JavaScript is used to create interactive web applications supported by the Netscape browser.
JavaScript is simple to use, lightweight, and dynamic. Developers can easily embed code functionality for interactive applications inside a web page.
Javascript is case sensitive and it will be run on client side.
VBScript:
VBScript is a server-side scripting language.
VBScript is not case sensitive and it will be run on server side.

147
Q

ASP.NET

What is a web server?

A

A web server delivers requested web pages to users who enter the URL in a web browser. Every computer on the Internet that contains a web site must have a web server program.

148
Q

ASP.NET

What are Cascading style sheets?

A

Cascading style sheets (CSS) collect and organize all of the formatting information applied to HTML elements on a Web form. Because they keep this information in a single location, style sheets make it easy to adjust the appearance of Web applications.

149
Q

ASP.NET

What is the base class of .net?

A

System.object

150
Q

What is the base class of Asp.net?

A

system.Web.UI

151
Q

ASP.NET

What is use of web.config?

A

■Web.config is used connect database from front end to back end.
■Web.config is used to maintain the Appsettimgs instead of static variables.

152
Q

ASP.NET

What is GAC or Global Assembly Cache?

A

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.`

153
Q

ASP.NET

What is a HashTable?

A

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.

154
Q

ASP.NET

What is CAS or Code Access Security?

A

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.

155
Q

ASP.NET

What is the Composite Custom Control?

A

Combination of existing HTML and Server Controls.

156
Q

ASP.NET

What is RangeValidator?

A

RangeValidator - checks whether a value falls within a given range of number, date or string.

157
Q

ASP.NET

What base class do all Web Forms inherit from?

A

System.web.UI.Page class

158
Q

ASP.NET

What is the difference between System.String and System.Text.StringBuilder classes?

A

System.String is immutable.
System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

159
Q

ASP.NET

How to Create a Cookie?

A

Cookie are one of several ways to store data about web site visitors during the time when web server and browser are not connected. Common use of cookies is to remember users between visits. Practically, cookie is a small text file sent by web server and saved by web browser on client machine.
The“Response.Cookies” command is used to create cookies.

160
Q

ASP.NET

How do you identify a Master Page?

A

The master page is identified by a special @ Master directive that replaces the @ Page directive that is used for ordinary .aspx pages.

161
Q

ASP.NET

Explain what a diffgram is and a good use for one?

A

The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. For reading database data to an XML file to be sent to a Web Service.

162
Q

ASP.NET

What is ValidationSummary?

A

ValidationSummary - It show a summary of errors raised by each control on the page on a specific spot or in a message box.

163
Q

ASP.NET

How do you indentify that the page is post back?

A

By checking the IsPostBack property. If IsPostBack is True, the page has been posted back.

164
Q

ASP.NET

What are the types of ASP Objects?

A

There are various types of Asp objects

■Session Object
■Application Object
■Server Object
■Request Object
■Response Object
■Error Object
165
Q

ASP.NET

What are remotable objects in .NET Remoting?

A

Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed.

166
Q

What is the difference between ASP Session and ASP.NET Session?

A

Asp.net session supports cookie less session & it can span across multiple servers.