Chitika

Saturday, October 27, 2012

A Leader Should Know How to Manage Failure


When i surfing the net i have gone through  one of the nice post i really impressed  that i am posting here.

Former President of India APJ Abdul Kalam at Wharton India Economic forum , Philadelphia, United States March 22,2008)

Question: Could you give an example, from your own experience, of how leaders should manage failure?

Kalam:   Let me tell you about my experience. In 1973 I became the project director of India's satellite launch vehicle program, commonly called the SLV-3. Our goal was to put India's "Rohini" satellite into orbit by 1980. I was given funds and human resources -- but was told clearly that by 1980 we had to launch the satellite into space. Thousands of people worked together in scientific and technical teams towards that goal.

By 1979 -- I think the month was August -- we thought we were ready. As the project director, I went to the control center for the launch. At four minutes before the satellite launch, the computer began to go through the checklist of items that needed to be checked. One minute later, the computer program put the launch on hold; the display showed that some control components were not in order. My experts -- I had four or five of them with me -- told me not to worry; they had done their calculations and there was enough reserve fuel. So I bypassed the computer, switched to manual mode, and launched the rocket. In the first stage, everything worked fine. In the second stage, a problem developed. Instead of the satellite going into orbit, the whole rocket system plunged into the Bay of Bengal. It was a big failure.

That day, the chairman of the Indian Space Research Organization, Prof. Satish Dhawan, had called a press conference. The launch was at 7:00 am, and the press conference -- where journalists from around the world were present -- was at 7:45 am at ISRO's satellite launch range in Sriharikota [in Andhra Pradesh in southern India]. Prof. Dhawan, the leader of the organization, conducted the press conference himself. He took responsibility for the failure -- he said that the team had worked very hard, but that it needed more technological support. He assured the media that in another year, the team would definitely succeed. Now, I was the project director, and it was my failure, but instead, he took responsibility for the failure as chairman of the organization.

The next year, in July 1980, we tried again to launch the satellite -- and this time we succeeded. The whole nation was jubilant. Again, there was a press conference. Prof. Dhawan called me aside and told me, "You conduct the press conference today."

I learned a very important lesson that day. When failure occurred, the leader of the organization owned that failure. When success came, he gave it to his team. The best management lesson I have learned did not come to me from reading a book; it came from that experience….

Abstract Class vs Interface


Basically abstract class is an abstract view of any real word entity and interface is more abstract one.
One of the most frequent question in an interview for a Junior/Graduate Developer role is ‘What is the difference between Abstract class and Interface? I have to admit that (as a Graduate).
I thought my intrepidness or whatever that skill I thought I had was far more important than being able to answer the difference between abstract and interface.

                   Abstract Class
Interface
An abstract class can have non-abstract Methods(concrete methods)
In Interface all the methods have to be abstract.
 can declare or use any variables
interface is not allowed to declare variables
In abstract class you can provide default behavior of a function, so that even if child class does not provide its own behavior, you do have a default behavior to work with. Eg. Abstract classes of framework, even if you don’t provide your own behavior, they have a default behavior
You cannot provide a default behavior in interfaces. Interfaces only allow you to provide signature of the method.

You can provide access modifiers to methods in abstract classes.
You cannot provide access modifiers methods in Interfaces.

the aim: making sure something is *eventually* implemented.
the aim: making sure something is interchangeable.
abstract class can have constructor declaration
interface cannot do so
abstract Class is allowed to have all access modifiers for all of its member declaration
Interface we can not declare any access modifier (including public) as all the members of interface are implicitly public.  
we cannot achieve multiple inheritance
Using an Interface we can achieve multiple inheritance.
Can be static , virtual ,abstract or sealed
Interface member cannot be defined using the keyword static, virtual, abstract or sealed
IS-A relationship
CAN-DO relationship.
e.g. Student IS A Person, Employee IS A Person.
e.g. Student CAN enrol, Student CAN submit assignment.
Ex: abstract class AbstractClass
{
    public AbstractClass ()
    {
    }
    int count = 0;
    int Max = 100;
    public abstract void getClassName();
}
Ex:

interface MyInteface
{
    void Method1();
    string Method2();
}


Saturday, October 20, 2012

Java Script Mouse Over Effect

This is the sample i am going to show you how to write on mouse effect using java script.Put your cursor here.


For the above sample you can check the code below.
The below code is used to show the alert on mouse over effect in java script
<table style="width: 40%px;"><tbody>
<tr>
<td align="right"><a href="http://draft.blogger.com/blogger.g?blogID=936809412703174765" onmouseover="alert(You are reading my blog.')">
This is the sample i am going to show you how to write on mouse effect using java script.Put your cursor here.</a></td></tr>
</tbody></table>

Put cursor on below image.


You can find all articles related to java script here


SQL SERVER Commands


This is the continuation of my articles on sql server.
In my previous article i have explained about database & table creation and data types in sql
DML
DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database.
SELECT – Retrieves data from a table
INSERT -  Inserts data into a table
UPDATE – Updates existing data into a table
DELETE – Deletes all records from a table
DDL
DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database.
CREATE – Creates objects in the database
ALTER – Alters objects of the database
DROP – Deletes objects of the database
TRUNCATE – Deletes all records from a table and resets table identity to initial value.
DCL
DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it.
GRANT – Gives user’s access privileges to database
REVOKE – Withdraws user’s access privileges to database given with the GRANT command
TCL
TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database.
COMMIT – Saves work done in transactions
ROLLBACK – Restores database to original state since the last COMMIT command in transactions
SAVE TRANSACTION – Sets a savepoint within a transaction
My previous article on sql server about database & table creation and data types in sql

Friday, October 19, 2012

Data base and table creation in sql server


In my previous article i have given introduction to sql server data types now its time for creating database and table.
Database:

SQL Server manages the objects in a container known as Database, where we can have multiple databases present in it, each database when created creates 2 files internally those or .mdf and .ldf file.

Syntax for creating a database:
            -CREATE DATABASE <db_name>
           
-Database names must be unique within an instance of SQL Server.
-Any Object name in sqlserver can be of 1 through 128 characters

Tables:

-It is the object, which will store the information in the database in the form of rows and columns.

Syntax for creating a Table:
            -CREATE TABLE <table_name>(
             column_name1 <dtype> [width],
             column_name1 <dtype> [width],
             ………………….
             column_namen <dtype> [width])

-Table names must be unique within the database.
-Column names must be unique within the table.
-Every table can have maximum of 1024 and minimum of 1 column.

            -CREATE TABLE Bank(Custid int, Cname varchar(50), Bal decimal(7,2))
In the next article i will explain about commands in sql server.

Thursday, October 18, 2012

Data types in sql server

Data Types in sql server 
In a Database, each column, local variable, expression, and parameter has a related data type. A data type is an attribute that specifies the type of data that the object can hold: integer data, character data, monetary data, data and time data, binary strings, and so on.

Integer Types: To hold the Integer values it provides with tinyint, smallint, int and bigint data types with sizes 1, 2, 4 and 8 bytes respectively.

Boolean Type: To hold the Boolean values it provides with bit data type that can take a value of 1, 0, or NULL.
Note: The string values TRUE and FALSE can be converted to bit values: TRUE is converted to 1 and FALSE is converted to 0.

Decimal Types: To hold the decimal values it provides with the following types:

            -decimal[ (p[ , s] )] and numeric[ (p[ , s] )]

p (precision)
The maximum total number of decimal digits that can be stored, both to the left and to the right of the decimal point. The precision must be a value from 1 through the maximum precision of 38. The default precision is 18.
s (scale)
The maximum number of decimal digits that can be stored to the right of the decimal point. Scale must be a value from 0 through p. Scale can be specified only if precision is specified. The default scale is 0.

Storage sizes of Decimal and Numeric types vary, based on the precision.

Precision
Storage bytes
1 – 9
5
10-19
9
20-28
13
29-38
17

Note: numeric is functionally equivalent to decimal.
 
-float [ ( n ) ] and real
-Approximate-number data types for use with floating point numeric data. Floating point data is approximate; therefore, not all values in the data type range can be represented exactly. Where n is the number of bits that are used to store the mantissa of the float number in scientific notation and, therefore, dictates the precision and storage size. If n is specified, it must be a value between 1 and 53. The default value of n is 53.

n value
Precision
Storage size
1-24
7 digits
4 bytes
25-53
15 digits
8 bytes

Monetary or Currency Types: To hold the Currency values it provides with the following types which takes a scale of 4 by default:
           
money
-922,337,203,685,477.5808 to 922,337,203,685,477.5807
8 bytes
smallmoney
- 214,748.3648 to 214,748.3647
4 bytes

Date and Time Values: To hold the Date and Time values of a day it provides with the following types:
           
Data type
Range
Accuracy
datetime
January 1, 1753, through December 31, 9999
3.33 milliseconds
smalldatetime
January 1, 1900, through June 6, 2079
1 minute
Values with the datetime data type are stored internally by the Microsoft SQL Server 2005 Database Engine as two 4-byte integers. The first 4 bytes store the number of days before or after the base date: January 1, 1900. The base date is the system reference date. The other 4 bytes store the time of day represented as the number of milliseconds after midnight.
The smalldatetime data type stores dates and times of day with less precision than datetime. The Database Engine stores smalldatetime values as two 2-byte integers. The first 2 bytes store the number of days after January 1, 1900. The other 2 bytes store the number of minutes since midnight.
String Values: To hold the string values it provides with the following types:
char [ ( n ) ]
Fixed-length, non-Unicode character data with a length of n bytes. n must be a value from 1 through 8,000. The storage size is n bytes.
varchar [ ( n | max ) ]
Variable-length, non-Unicode character data. n can be a value from 1 through 8,000. max indicates that the maximum storage size is 2^31-1 bytes. The storage size is the actual length of data entered + 2 bytes.
text
It was equal to varchar(max) this data type will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work use varchar(max) instead.
Unicode Data types for storing Multilingual Characters are nchar, nvarchar and ntext where n stands for national.
nchar [ ( n ) ]
Fixed-length Unicode character data of n characters. n must be a value from 1 through 4,000. The storage size is two times n bytes.
nvarchar [ ( n | max ) ]
Variable-length Unicode character data. n can be a value from 1 through 4,000. max indicates that the maximum storage size is 2^31-1 bytes. The storage size, in bytes, is two times the number of characters entered + 2 bytes.
ntext
It was equal to nvarchar(max) this data type will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work use nvarchar(max) instead.

Binary Values: To hold the binary values likes images, audio clips and video clips we use the following types.

binary [ ( n ) ]
Fixed-length binary data with a length of n bytes, where n is a value from 1 through 8,000. The storage size is n bytes.
varbinary [ ( n | max) ]
Variable-length binary data. n can be a value from 1 through 8,000. max indicates that the maximum storage size is 2^31-1 bytes. The storage size is the actual length of the data entered + 2 bytes.
Image
It was equal to varbinary(max) this data type will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work use varbinary(max) instead.
  • Use char, nchar, binary when the sizes of the column data entries are consistent.
  • Use varchar, nvarchar, varbinary when the sizes of the column data entries vary considerably.
  • Use varchar(max), nvarchar(max), varbinary(max) when the sizes of the column data entries vary considerably, and the size might exceed 8,000 bytes.
Other Types: Apart from the above it provides some additional types like -
timestamp: Is a data type that exposes automatically generated, unique binary numbers within a database. The storage size is 8 bytes. You can use the timestamp column of a row to easily determine whether any value in the row has changed since the last time it was read. If any change is made to the row, the timestamp value is updated. If no change is made to the row, the timestamp value is the same as when it was previously read.
Uniqueidentifier: Is a 16-byte GUID which is initialized by using the newid() function or converting a string constant in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx which is used to guarantee that rows are uniquely identified across multiple copies of the table.

Xml: Is the data type that stores XML data. You can store xml instances in a column, or a variable of xml type. The stored representation of xml data type instances cannot exceed 2 gigabytes (GB) in size. 

In the next articles i will discuss about creating database and table then commands in sql

Tuesday, October 16, 2012

Asp.net Interview Questions and answers


Asp.net Interview Questions and answers

Previously i posted c# questions with answers  now it's time for asp.net
1.
What is ASP.NET?

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.

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

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.

3.
What is Difference between Namespace and Assembly?

Namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.

4.
What is the difference between early binding and late binding?

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.

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

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.

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

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

7.
What is reflection?

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.

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

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.
9.
What is a PostBack?

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

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

System.Web.UI.Page

11.
What’s a bubbled event?

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.

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

§  Server-side code executes on the server.
§  Client-side code executes in the client’s browser.

13.
What is the difference between static or dynamic assemblies?

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.

14.
What are the difference between Structure and Class?

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

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

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.

16.
What is the difference between Custom Control and User Control?

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.
17.
What is the difference between ASP Session State and ASP.Net Session State?

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.

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

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

20.
What are the types of Authentication?

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.

21.
What are the different types of Validation Controls?

There are six types of validation controls available :
§  RequiredFieldValidator
§  RangeValidator
§  RegularExpressionValidator
§  CompareValidator
§  CustomValidator
§  ValidationSummary

22.
What is the Web User Control?

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.

23.
What namespaces are necessary to create a localized application?

§  System.Globalization
§  System.Resources

24.
How to Manage State in ASP.Net?

There are several ways to manage a state.
§  ViewState
§  QueryString
§  Cookies
§  Session
§  Application
25.
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.

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

27.
How to view an assembly?

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

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

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.

29.
What are the layouts of ASP.NET Pages?

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

30.
What is Delegates?

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.

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

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.

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

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.
33.
What is datagrid?

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.

34.
How do you hide the columns?

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.

35.
What are different types of directives in .NET?

§  @Page
§  @Control
§  @Import
§  @Implements
§  @Register
§  @Assembly
§  @OutputCache
§  @Reference

36.
What data type does the RangeValidator control support?

§  Integer
§  String.
§  Date.

37.
What is cookies?

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

38.
How many classes can a single .NET DLL contain?

It can contain many classes.

39.
What methods are fired during the page load?

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

40.
What is the difference between Value Types and Reference Types?

Value Types uses Stack to store the data.
where as Reference type uses the Heap to store the data.
41.
What is the difference between Server-side scripting and Client-side scripting?

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.

42.
How do you create a permanent cookie?

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.

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

§  Server.Transfer
§  Server.Execute.

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

Server.transfer

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

< asp:HyperLinkColumn > < / asp:HyperLinkColumn >

46.
What is web.config file?

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.

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

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.

48.
What is a PostBack?

The process in which a Web page sends data back to the same page on the server.
49.
How many languages .NET is supporting now?

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

50.
What is smart navigation?

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

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

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

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

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.

53.
Which two properties are on every validation control?

We have two common properties for every validation controls:

§  Control to Validate
§  Error Message

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

CompareValidator is used to ensure that two fields are identical.

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

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.

56.
What is strong-typing versus weak-typing?

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.
57.
What is boxing and unboxing?

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.

58.
What is garbage collection?

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.

59.
What is serialization?

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.

60.
What is the differnce between Managed code and unmanaged code?

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

61.
What is difference between constants, readonly and, static?

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

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

System.Reflection

63.
How big is the datatype int in .NET?

32 bits

64.
What is difference between abstract classes and interfaces?

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.
65.
In which event are the controls fully loaded?

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.

66.
What is the use of @ Register directives?

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

67.
Define RequiredFieldValidator?

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

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

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.

69.
What are the difference between const and readonly?

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

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

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

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

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

72.
What is the difference between inline and code behind?

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.
73.
What is the difference between early binding and late binding?

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.

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

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

75.
What is Common Language Runtime?

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.

76.
What is Intermediate Language?

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.

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

78.
What is Common Langauge Specification?

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.

79.
Which class deals wit the user’s locale information?

System.Web.UI.Page.Culture

80.
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.
81.
Can we disable ViewState, If, yes how?

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

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

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

84.
What are different types of Assemblies?

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

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

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

§  ItemTemplate
§  AlternatingItemTemplate.

87.
What are the advantages of an assembly?

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

88.
What is an ArrayList?

The ArrayList object is a collection of items containing a single data type values.
89.
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.

90.
Which namespaces are used for data access?

§  System.Data
§  System.Data.OleDB
§  System.Data.SQLClient

91.
What is Remoting?

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.

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

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

93.
What is a SESSION and APPLICATION object?

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.

94.
What is the difference between a Thread and a Process?

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.

95.
What's the difference between the Debug class and Trace class?

§  Documentation looks the same.
§  Use Debug class for debug builds.
§  use Trace class for both debug and release builds.

96.
What’s the top .NET class that everything is derived from?

System.Object
97.
How is method overriding different from overloading?

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

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

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

99.
What is the differences between Server-side and Clientside code?

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

100.
What’s an interface?

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

101.
What is a formatter?

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.

102.
What is Marshalling?

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.

103.
What is a Static class?

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

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

106.
What is a DataTable?

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

107.
What is a life span of a static variable?

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

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

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.

109.
How many namespaces are in .NET version 1.1?

124

110.
What is sealed class

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

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

§  Server controls
§  HTML controls
§  Data controls
§  System components.

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

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.
113.
What is AutoPostback?

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

114.
What is Globalization?

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

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

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

116.
Is string a value type or a reference type?

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

117.
What base class do all Web Forms inherit from?

System.web.UI.Page class

118.
What does assert () do?

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.

119.
What is cookie less session? How it works?

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.

120.
What is the difference between Compiler and Interpreter?

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.
121.
What is the difference between an ADO.NET Dataset and an ADO Recordset?

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

122.
What are the validation controls?

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.

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

§  “Web.config” files apply settings to each web application.
§  While “Machine.config” file apply settings to all ASP.NET applications.

124.
What is event bubbling?

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.

125.
What is the use of @ Register directives?

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

126.
Where is View State information stored?

In HTML Hidden Fields.

127.
What is role based security?

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.

128.
What is the difference between Asp and Asp.net?

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.
129.
What are the various security methods which IIS Provides apart from .NET?

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.

130.
What are Master Pages in ASP.NET?

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.

131.
What are the advantages of ASP.Net?

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

132.
What is event bubbling?

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.

133.
What is WSDL?

WSDL 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.
134.
What is the use of @ Register directives?

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

135.
What is the difference between javascript and vbscript?

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.

136.
What is a web server?

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.

137.
What are Cascading style sheets?

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.

138.
What is the base class of .net?

System.object

139.
What is the base class of Asp.net?

system.Web.UI

140.
what is use of web.config?

§  Web.config is used connect database from front end to back end.
§  Web.config is used to maintain the Appsettimgs instead of static variables.
141.
What is difference between abstract classes and interfaces?

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.

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

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

144.
What is CAS or Code Access Security?

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.

145.
What is the Composite Custom Control?

Combination of existing HTML and Server Controls.

146.
What is RangeValidator?

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

147.
What base class do all Web Forms inherit from?

System.web.UI.Page class

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

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

I will keep updating the content till that,