What are the Differences between Server.Transfer and Response.Redirect ?

Tuesday, July 7, 2009

Difference between Server.Transfer and Response.Redirect

























Sno Server.Transfer Response.Redirect
1 The navigation happens on the server-side ,so client history is not updated The navigation happens on the client-side ,so client history is  updated
2 Data can be persist accros the pages using Context.Item collection Context.Items loses the persisitance.
3 No Round-trips Makes a Round-trip
4 Has Good encapsulation No

What are the differences between value and reference types

























Sno


Value Types



Reference Types

1 

They contain their data directly

They store a reference to their value’s memory

2

They are allocated for storage either in stack or inline in structure..

They are allocated for storage in heap

3

can be built-in (implemented by the runtime), user-defined, or enumerations

self-describing types, pointer types, or interface types.


What are the differences between machine.config and web.config files?





























Sno

Web.config

Machine.config

1 

It is a config file for a single application.

It is a config file which is common for all the applications in a machine

2

It will be available in the application folder.

It is available in the Microsoft.NET\Framework\{version}\CONFIG Folder.

3

The settings in the web.config overrides that of Machine.config

Cant do.

4

Automatically installed when visual studio .net is installed

This is automatically created when you create an asp.ne website




What are the differences between Trace and Debug?



















Sno

Trace

Debug

1 

Works in both Debug and Release mode

Works
only in Debug mode.

2

Trace is enabled by default in visual studio

Debug is not enabled. You can manually do that.




What is the difference between a custom control and a user control ?







































Sno

User Control

Custom Control

1 

Is a file with the .ascx extension

Is a file with the .dll extension

2

Can be
only used with the application

Can be
used in any number of applications

3

Language
dependent.

They are
language independent, a control
created in c# can be used in vb.net

4

Can’t be
added to Visual studio Toolbox

Can be added to Visual studio Toolbox

5

Inherits
from Server controls and easy to create.

You have
to develop from scratch ,
so comparatively
difficult.

6

Generally
used for static content

Used when
dynamic content is required

What is the difference between CCW and RCW ?













Sno

CCW

RCW

1

COM to .NET communication happens through COM Callable Wrapper

.NET to COM Communication happens through Remote Callable Wrappter

What is Serialization ? What are the Types of Serialization and their differences?

Serialization:
It is the process of converting an object to a form suitable for either making it persistent or tranportable.
Deserialization is the reverse of this and it converts the object from the serialized state to its original state.

Types:
1. Binary
2. XML

Differences:













Sno Binary XML
1

It preserves type fidelity , which is useful for preserving


the state of the object between transportation and invocation.


It doesnt preserves type fidelity and hence state cant be


maintained.

2 As it is the open standard its widely used Not that much compared to
Binary.

Differences between Dataset and DataReader



























Sno Dataset DataReader
1 Disconnected Mode Connected Mode
2 Can navigate back and forth Can navigate forward only
3 Data is editable Data is Readonly
4 Can contain more than one table and relationships Can contain only one row at a time.
5 Slower as having more overhead Faster when compared with dataset.

What are the differences between value and reference types

























Sno


Value Types



Reference Types

1 

They contain their data directly

They store a reference to their value’s memory

2

They are allocated for storage either in stack or inline in structure..

They are allocated for storage in heap

3

can be built-in (implemented by the runtime), user-defined, or enumerations

self-describing types, pointer types, or interface types.


Blog Widget by LinkWithin