Thursday, December 22, 2011

SHA1 encryption in C# / ASP.NET

The .NET framework has a some useful hidden methods available.
One of them is a static method of the FormAuthentication class,
from the System.Web.Security namespace, HashPasswordForStoringInConfigFile().

---------------------------------------------------------------------------

using System;
using System.Web;
using System.Web.Security;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string password =
FormsAuthentication.HashPasswordForStoringInConfigFile("password", "SHA1");
Response.Write(password);
}
}

---------------------------------------------
This code writes “5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8″ to the page.
--------------------------------
Also You can Visit ... [www.ratajik.com/CreateNetPassword/Default.aspx ]

Saturday, August 20, 2011

Documentation of Social Netwroking Site Like ORKUT

Kindly clikc thye link bellow....
If Like This link then must comment and Pass my link to others student it will help others

Monday, August 15, 2011

OSI MODEL [Computer Networks]



The Open Systems Interconnection model (OSI model) was a product of the Open Systems Interconnection effort at the International Organization for Standardization. It is a way of sub-dividing a communications system into smaller parts called layers.The OSI Model is a model that illustrates how data communications should take place.
It segregates the process into seven group of Layers given above..........

1) Physical Layer : Physical Layer is responsible for transmitting row bit stream over the physical cable. The physical layer defines the hardware items such as cables, cards, voltages etc.
2) Data Link Layer : Data link layer is responsible for controlling the error between adjacent nodes and transfer the frames to other computer via physical layer. Data link layer is used by hubs and switches for their operation.
3) Network Layer : This layer is responsible for translating the logical network address and names into their physical address ( MAC address). This layer is also responsible for addressing, determining routes for sending and managing network problems such as packet switching, data congestion and routines
4) Transport Layer : This layer is responsible for end-to-end delivers of messages between the networked hosts. It first divides the streams of data into chunks or packets before transmission and then the receiving computer re-assembles the packets. It also guarantee error free data delivery without loss or duplications.Protocols found at this layer include TCP, UDP.
5) Session Layer : This layer is responsible for establishing the process-to-process communication between the host in the network. This layer is responsible for establishing and ending the sessions across the network. The interactive login is an example of services provided by this layer in which the connective are re-connected in care of any interruption
6) Presentation Layer : The Presentation layer is responsible for protocol conversion, Encryption and compression should be Presentation Layer functions. This layer makes the communications between two host possible.
7) Application Layer : The application layer provider different services to the application. Example of services provided by this layer are file transfer, electronic messaging e-mail, virtual terminal access and network management. This is the layer with which the user interacts.

At Last I would give You a Tip to Remember these 7 Layers.....

How to remember the layer of OSI model?

Ans: The easiest way to remember use the mnemonic

"All people seem To need Data Processing"

@Gaurav Kapoor [VSoftTechnologies]

Thursday, August 11, 2011

SDLC- System Development Life Cycle (SDLC)

SDLC is the process of developing information systems through investigation, analysis, design, implementation and maintenance. SDLC is also known as information systems development or application development. It is also known as Waterfall Model.

The software development life cycle (SDLC) is the entire process of formal, logical steps taken to develop a software product. The phases of SDLC can vary somewhat but generally include the following

SDLC is a System Development Life Cycle or Software Development Life Cycle.SDLC is the process of software development. This is the simplest definition of SDLC. There are so many methodologies which are involved in SDLC. The important stages are project planning, requirement gathering/analysis, designing, coding, testing and maintenance.

The six stages of SDLC.

The stages of the SDLC are designed to depend on one another, taking the outputs from the previous stage, adding additional effort, and producing results that leverage the previous stage effort.

Planning

Planning stage is used to establish the basic project structure and plan, feasibility study such as economical, operational, and technical, quality assurance, and risks associated with the project, and describe appropriate management and technical approaches.

Requirement Analysis

The objective of requirement analysis is to determine where the problem is and how to fix it. This phase is also known as Feasibility study. This steps includes breaking down the system in different parts and drawing diagrams to analyze the situation, analyzing project goals, breaking down what needs to be created and attempting to appoint users so that definite requirements can be defined. The development team examines the need for possible software in the given system. At the end of the feasibility study, the team furnishes a document that holds the different specific recommendations for the candidate system.

Designing

In this phase of software development process, the overall software’s structure and layouts are designed. The design stage takes its initial inputs from the approved requirements document. In this phase, in terms of the client/server technology, the number of layers needed for the package architecture, the database design, the data structure design etc are all defined. Thus, an overall software development model is created. So, analysis and designing is very essential in the entire development cycle. The output of this stage describes the new system as a collection of modules.

Coding

The actual programming code is generated during this stage. If the design is performed in a detailed manner, code generation can be accomplished without much complication. Programming tools like compilers, interpreters, debuggers etc are used to generate the code. Different high level programming languages such as C, C++, Pascal, Java, and PHP are used for coding. The programming language is chosen with respect to the type of application.

Testing

Once the coding is done, the software program testing begins. Different testing methodologies are available to fix the bugs that were committed during the previous phases. Different testing tools and methodologies are already available but some companies build their own testing tools that are tailor made for their own development operations.

Maintenance

The maintenance of software is an important aspect of SDLC. The software will definitely undergo change once it is delivered to the customer. Change could happen because of some unexpected input of values into the system/software or the changes in the system could directly affect the software operations. Sometimes new changes are implemented which requires the system updates.

The learning above has been from my readings on the web, and from the various reputed software companies in India. If you feel that I have missed anything, please feel free to share your feedbac

Friday, July 22, 2011

Types of Computer Networks

Computer networks are of many different types such as Personal area network (PAN), Local area network (LAN), Metropolitan area network (MAN), Campus area network (CAN) and Wide area network (WAN). The computer networks which are designed for personal use are known as PAN or personal area networks. A PAN network is typically on an area of 20 to 30 feet. When we need the facility of network to be used on a really small commercial area or in small computer labs, we prefer LAN. LANs are capable of higher data transfer within small geographical area. LAN usually operates at a speed of Giga Bit. CAN is larger network than LAN. CAN is usually established in university campus to establish a connection among different computer labs, library, registration office and different academic units. MAN is usually a middle way to LAN and WAN. It is established by the various interconnections between WAN and LAN. Man is spread over an area of around 5 to almost 50 km. MAN has many applications , it is most commonly used in banks, online reservation systems and in many military based services. If we make a complex network of many LANs we will end up making a wide area network. Wide area network is commonly known as internet. The applications and availability of internet can be now seen in every building of commercial or other nature.

What is LAN (Local Area Network)

LAN stands for Local Area Netowrk, LAN (Local Area Network) is a network which is established to meet the needs of small areas. It can be applied to home, offices, airports and in small college computer labs. The idea of developing LAN is to utilize the fast data transfer over a small geographical area. LAN (Local Area Network) was developed with a view to establish better interconnections within the individual computer units. LAN (Local Area Network) network is preferred due to its fast access and affordability. LAN (Local Area Network) is employed to build successful sophisticated network for data sharing

How LAN Works

Early LAN (Local Area Network) networks were formed using coaxial cable, coax is an electric cable and it is used to carry radio signals. LAN (Local Area Network) setup is developed by connecting two or more than two computers with each other using a physical connection in order to share files and data overtime. The basic application of this cable is to connect the radio transmitters with their antennas. However it is also used for developing internet connections and for distributing cable channels. Most common type of developing LAN (Local Area Network) network is the Ethernet. Ethernet is usually termed as a major data and physical link layer technology. Ethernet is often associated with the name of engineer Robert Metcalfe ( January 2011, he holds the position of Professor of Electrical Engineering and Director of Innovation at The University of Texas at Austin). Ethernet today can give the maximum data rate of up to 100 Mbps. Ethernet has proved to be an effective way to serve as a data transfer medium for internet protocols. Usually Ethernet cables are extended to the length of 100 meters, but this is not the ultimate limit. Ethernet cables can be extended according to the need. When you decide to develop a LAN (Local Area Network), try to use the specialized software like the Microsoft windows. Microsoft widows provide special internet sharing features which help LAN (Local Area Network)

Metropolitan Area Network (MAN)

A large computer network which extends to a city or to a large university campus is termed as metropolitan area network or MAN. The purpose of MAN (Metropolitan Area Network) is to provide the link to the internet in the long run. A MAN (Metropolitan Area Network) usually incorporates a number of LANs to form a network. This large network MANs (Metropolitan Area Network) backbone comprises of an optical fiber set-up

How MAN works

MAN (Metropolitan Area Network) usually falls between LAN and WAN. It is generally applied to connect geographically dispersed LANs. Therefore the goal of MAN is to develop a communication link between two independent LAN nodes. A MAN (Metropolitan Area Network) is usually established using optical fiber. The network is established using routers and switches. A switch is a port which is active in handling the filtration of data usually coming in the form of frames. Any switch acts as a dual port, at one end it is handling filtration of data and at the other end managing connections. Router is another device for facilitating the netwosrk connection. Router helps the data packets to identify the path to be taken. Hence in other words it keeps an eye on the data transfer. MAN (Metropolitan Area Network) is usually operated over an area of up to 50kms. when you establish metropolitan area network it offers you the speed of 1000mbps as a whole with the lowest cost involved

What is WAN

As the name symbolizes wide area network is a broad network whose communication is wider than the LAN, MAN and even CAN. The application of WAN (Wide Area Network) is not limited to a room, building or specific vicinity. The basic purpose of Wan is to maintain a number of LAN networks in order to increase the efficiency of the network. Different LAN networks are connected to establish a network which will enable the users of one location to communicate with the users present in the other location. Internet service providers usually help and guide to establish WAN (Wide Area Network) networks. However many large organizations develop their own private WAN's (Wide Area Network)s.WAN networks are established often by seeking help from telecomm departments who provide the facility of leased lines. Router is connected to the LAN at one side and a hub is attached at the other end. This is an expensive way of establishing WAN (Wide Area Network) network. WAN (Wide Area Network) networks are often established using circuit switching method. A circuit switching network is established when at the one end a node and on the other end a terminal is physically connected to each other for further communication. The most common physical network nodes are switches, hub and a modem. Whereas a terminal is a physical device that does the basic communication, for example like a telephone, call answering machine or a printer sometimes. The data travels through the use of network protocols. The protocols are the defined rules which guide the information transfer. The purpose of protocols is to detect the errors.

How WAN Works

If we develop a virtual switching network or packet switching network then we often need frame relays to transfer the data within a WAN (Wide Area Network). Frames are data packets which are transferred from one end to the other. There are many types of WAN (Wide Area Network) protocols like TCP/IP, MPLS, frame relays and ATM. Most of the WAN's (Wide Area Network) however use X.25 is a famous WAN protocol used for packet transfer. X.25 is established with the packet switching exchange, which are the physical nodes at one end and the leased telephones lines at the other end

Campus Area Network (CAN)

A campus area network known as (CAN) is used to inter-connect networks in limited geographical locality like university campus, military bases, or organizational campuses etc. It can be taken as the metropolitan network that has the specific settings at the small area just like a computer lab in the university. (Campus Area Network) area is no doubt larger than a local area network but it is still smaller then a wide area network. These networks are designed for the particular place that hits the highest point level. For example, multiple labs, multiple offices in the buildings etc. most of the time, this term is referred as the university campus but when it is used at organizational level, we call it corporate campus network.As we have discussed above it is smaller than a wide area network and multiple Local Area Network (LAN) combines in one organization or regions to make a Campus Area Network (CAN). Therefore, whenever some one tells you about the networks within the specific area, you can easily guess that it is campus network

How CAN (Campus Area Networks) Work, Uses of CAN
As we know that universities are the best example of this type of interconnection hence, different blocks of universities such as administrative office, educational departments, staff rooms, gymnasium, common room, hostels and conference halls when connected with each other combine to form the CAN (Campus Area Network). In most cases, corporate campuses are connected through the wireless communication mediums rather than cabling and wirings because they are more economical to use as compare to the long wiring and cabling. Organizations do follow this strategy because they always try to maintain the best outcome by investing less and with the wireless communication throughout their building offices, they can manage their budget that they may be spending on the wiring, hubs, switches etc. they can perform the same task by only connecting one or two devices at their main office and providing signals to other departments which they can use without any difficulty.


Campus Area networks (CAN) are economical, beneficial and easy to implement in the specific kilometers of locality. It is very helpful for the universities and other corporate organizations to work from any block and receive the same speed of data transfer

Personal Area Network - PAN

The communication network established for the purpose of connecting computer devices of personal use is known as the personal area network PAN (Personal Area Network).when a network is established by connecting phone lines to personal digital devices or PDAs (personal digital assistants), this communication is known as PAN (Personal Area Network). Thomas Zimmerman was the first research scientist to introduce the idea of Personal Area Network (PAN) PAN networks often cover an area of 30 feet. Personal Computer devices may include palm tops mobile phones, potable media players, play stations and net books.It Mainly use as wireless. PANs (Personal Area Network)s are dependent on the Bluetooth or infrared technologies for the transmission of wireless signals.

Storage area network (SAN)

A network which is created by attaching storage devices such as disk arrays and tapes to a common server so that the storage devices appear to be confined to operating system is known as storage area network

How SAN Works

Data in SAN (Storage Area Network) can be stored using two basic modules as DAS (Direct Attached Storage) and NAS (Network Attached Storage). DAS is so named because it is a directly attached to a server without any intermediary network involved. Main distinguishing character of DAS (Direct Attached Storage) is its direct connectivity through a host bus adapter without the use of the networking devices as hubs, bridges and switches. In a network attached storage system, many independent clients can access the storage memory. The aim of the NAS (Network Attached Storage) is to provide only file based storage devices. DAS (Direct Attached Storage) can also provide multiple and parallel access if we equip this network with multiple ports. In the same way we can convert NAS (Network Attached Storage) to a DAS (Direct Attached Storage) by disconnecting the entire network and attach the port to a single computer. DAS (Direct Attached Storage) can be termed as an inefficient network because it cannot share its idle resources with other units in the network. DAS (Direct Attached Storage) and SAN (Storage Area Network) can overcome this deficiency but both these networks are costly and difficult to handle. Main DAS (Direct Attached Storage) protocols are SATA, SAS and fiber channel

Virtual Private Network - VPN

Our world is becoming a global village; this is due to the development in the communication world. This has also led to the expansion of the businesses across globe. Wide scale expansion of business in many parts of the world evolved the need for communication. Companies throughout the world instead of communicating with the regional offices focused their attention towards developing their own Virtual Private Networks or VPNs INTRANET is an example of this

How VPN Works

As compared to the other networks the architecture of this network is much simple. First step of establishing VPN (Virtual Private Network) is installation of client software. The modem of the user is connected to the firewall first and then it is connected to the main server. When the main connection is established the VPN (Virtual Private Network) software, the workstation devices connect to the main server or the VPN (Virtual Private Network) server through the secure VPN (Virtual Private Network) tunnel. The data has to travel through this tunnel first and then it proceeds further. The outer layer of the tunnel is surrounded by dangerous internet viruses. This network is fully secured because of the secure tunnel. The data is encrypted at the sender end when the data travels to the receiver it can be decrypted. When the data is sent the remote computers authenticate the data, and this is due to the secure tunnel connection. The VPN (Virtual Private Network) server provides security when the ISPs provide you with an unsecured internet connection. The data cannot be read by the other due to strong encryption and decryption modes. VPN (Virtual Private Network) ensures that all data travels through the tunnel before reaching to the remote computers

Tuesday, July 19, 2011

NETWORKING CONCEPT FOR General Knowledge Mark It

Difference in Hub, Switch, Bridge, & Router

In an ethernet network there are 4 devices that from the the outside look very similar. In this article we will look at the difference between hubs, switches, bridges, and routers.

Hub


A hub is the simplest of these devices. Any data packet coming from one port is sent to all other ports. It is then up to the receiving computer to decide if the packet is for it. Imagine packets going through a hub as messages going into a mailing list. The mail is sent out

to everyone and it is up to the receiving party to decide if it is of interest.

The biggest problem with hubs is their simplicity. Since every packet is sent out to every computer on the network, there is a lot of wasted transmission. This means that the network can easily become bogged down.

Hubs are typically used on small networks where the amount of data going across the network is never very high.

Bridge


Bridge device filters data traffic at a Network boundry.It Reduce the amount of traffic on LAN by deviding it into 2 segments. A bridge goes one step up on a hub in that it looks at the destination of the packet before sending. If the destination address is not on the other side of the bridge it will not transmit the data.

A bridge only has one incoming and one outgoing port.

To build on the email analogy above, the bridge is allowed to decide if the message should continue on. It reads the address bob@smith.com and

decides if there is a bob@smith.com on the other side. If there isn’t, the message will not be transmitted.

Bridges are typically used to separate parts of a network that do not need to communicate regularly, but still need to be connected.

Switch

A switch steps up on a bridge in that it has multiple ports. When a packet comes through a switch it is read to determine which computer to send the data to.

This leads to increased efficiency in that packets are not going to computers that do not require them.

Now the email analogy has multiple people able to send email to multiple users. The switch can decide where to send the mail based on the address.

Most large networks use switches rather than hubs to connect computers within

the same subnet.

Router

A router is similar in a switch in that it forwards packets based on address. But, instead of the MAC address that a switch uses, a router can use the IP address. This allows the network to go across different protocols.

The most common home use for routers is to share a broadband internet connection. The router has a public IP address and that address is shared with the network. When data comes through the router it is forwarded to the correct computer.

This comparison to email gets a little off base. This would be similar to the router being able to receive a packet as email and sending it to the user as a fax.

Sunday, July 3, 2011

Interview Help about Stored Procedures for ASP.Net Programmers

What are Stored Procedures?

SPs are an advanced feature in SQL server that offers you to create, compile and run SQL statements in the server itself, to isolate your business logic from data logic and to improve the performance of your application.
In short, write SQL queries in a specific format in the SQL server and call them from your application, instead of writing queries inside your program code.

Why write Stored procedures?

1.Mainly to increase the performance and the momentum to our programs. When you write a stored procedure, it will be pre-compiled by the SQL server, so that it can increase the speed of executing the queries and hence your application. When you write a stored procedure the database(DB) server automatically generates an execution plan for the procedure. The plan will be updated whenever a change is made in the procedure by the DB server.

2.You can take away all your SQL commands so that the data logic can be isolated from your business logic(ie.,Coding). This kind of encapsulation helps the web server to read and interpret lengthy and complex SQL commands.

3.Then like COM, stored procedures can be reused. For example if you want to do the same query in two different ASP pages or in VB forms, you can reuse the stored procedure which you have written for one page, It saves you time.

4.The application code as well as the stored procedure code are becoming easy to maintain. Updating a stored procedure may not affect the other part of an application or user who uses the same stored procedure.

5.The queries can be customized by using input/output parameters, like functions and procedures which you write in your programming languages.

Saturday, June 25, 2011

Thursday, June 23, 2011

Basic about " MVC "

MVC (Model-View-Controller).
If you are looking to build your web applications using a MVC approach, I think you'll find this new ASP.NET MVC Framework option very clean and easy to use. It will enable you to easily maintain separation of concerns in your applications.

http://wiki.asp.net/page.aspx/286/aspnet-mvc-framework/

Regards:GauravMCA

Thursday, June 16, 2011

Propertiies in C# 4.0

Properties provide the opportunity to protect a field in a class by reading and writing to it through the property.Another benefit of properties over fields is that you can change their internal implementation over time.

We know that data encapsulation and hiding are the two fundamental characteristics of any object oriented programming language.In C#, data encapsulation is possible through either classes or structures. By using various access modifiers like private, public, protected, internal etc it is possible to control the accessibility of the class members.

Usually inside a class, we declare a data field as private and will provide a set of public SET and GET methods to access the data fields. This is a good programming practice, since the data fields are not directly accessible out side the class. We must use the set/get methods to access the data fields.

An example, which uses a set of set/get methods, is shown below.

//SET/GET methods
//Author: mca2009.gaurav@yahoo.com
using System;
class MyClass
{
private int x;
public void SetX(int i)
{
x = i;
}
public int GetX()
{
return x;
}
}
class MyClient
{
public static void Main()
{
MyClass mc =
new MyClass();
mc.SetX(10);
int xVal = mc.GetX();
Console.WriteLine(xVal);
//Displays 10
}
}

But C# provides a built in mechanism called properties to do the above. In C#, properties are defined using the property declaration syntax. The general form of declaring a property is as follows.


{
get
{
}
set
{
}
}

Where can be private, public, protected or internal. The can be any valid C# type. Note that the first part of the syntax looks quite similar to a field declaration and second part consists of a get accessor and a set accessor.

For example the above program can be modifies with a property X as follows.

class MyClass
{
private int x;
public int X
{
get
{
return x;
}
set
{
x =
value;
}
}
}

The object of the class MyClass can access the property X as follows.

MyClass mc = new MyClass();

mc.X = 10; // calls set accessor of the property X, and pass 10 as value of the standard field 'value'.
This is used for setting value for the data member x.
Console.WriteLine(mc.X);// displays 10. Calls the get accessor of the property X.

The complete program is shown below.

//C#: Property
//Author: mca2009.gaurav@yahoo.com
using System;
class MyClass
{
private int x;
public int X
{
get
{
return x;
}
set
{
x =
value;
}
}
}
class MyClient
{
public static void Main()
{
MyClass mc =
new MyClass();
mc.X = 10;
int xVal = mc.X;
Console.WriteLine(xVal);
//Displays 10
}
}

Remember that a property should have at least one accessor, either set or get. The set accessor has a free variable available in it called value, which gets created automatically by the compiler. We can't declare any variable with the name value inside the set accessor.

We can do very complicated calculations inside the set or get accessor. Even they can throw exceptions.

Since normal data fields and properties are stored in the same memory space, in C#, it is not possible to declare a field and property with the same name.

Static Properties

C# also supports static properties, which belongs to the class rather than to the objects of the class. All the rules applicable to a static member are applicable to static properties also.

The following program shows a class with a static property.

//C# : static Property
//Author:mca2009.gaurav@yahoo.com
using System;
class MyClass
{
private static string x;
public static string X
{
get
{
return x;
}
set
{
x =
value;
}
}
}
class Client
{
public static void Main()
{
MyClass.X = "Gaurav";
string xVal = MyClass.X;
Console.WriteLine(xVal);
//Displays Gaurav
}
}

Remember that set/get accessor of static property can access only other static members of the class. Also static properties are invoking by using the class name.

Properties & Inheritance

The properties of a Base class can be inherited to a Derived class.

//C# : Property : Inheritance
//Author: mca2009.gaurav@yahoo.com
using System;
class Base
{
public int X
{
get
{
Console.Write("Base GET");
return 10;
}
set
{
Console.Write("Base SET");
}
}
}
class Derived : Base
{
}
class MyClient
{
public static void Main()
{
Derived d1 =
new Derived();
d1.X = 10;
Console.WriteLine(d1.X);
//Displays 'Base SET Base GET 10'
}
}

The above program is very straightforward. The inheritance of properties is just like inheritance any other member.

Properties & Polymorphism

A Base class property can be polymorphicaly overridden in a Derived class. But remember that the modifiers like virtual, override etc are using at property level, not at accessor level.

//C# : Property : Polymorphism
//Author: mca2009.gaurav@yahoo.com
using System;
class Base
{
public virtual int X
{
get
{
Console.Write("Base GET");
return 10;
}
set
{
Console.Write("Base SET");
}
}
}
class Derived : Base
{
public override int X
{
get
{
Console.Write("Derived GET");
return 10;
}
set
{
Console.Write("Derived SET");
}
}
}
class MyClient
{
public static void Main()
{
Base b1 =
new Derived();
b1.X = 10;
Console.WriteLine(b1.X);
//Displays 'Derived SET Derived GET 10'
}
}

Abstract Properties


A property inside a class can be declared as abstract by using the keyword abstract. Remember that an abstract property in a class carries no code at all. The get/set accessors are simply represented with a semicolon. In the derived class we must implement both set and get assessors.

If the abstract class contains only set accessor, we can implement only set in the derived class.

The following program shows an abstract property in action.

//C# : Property : Abstract
//Author: mca2009.gaurav@yahoo.com
using System;
abstract class Abstract
{
public abstract int X
{
get;
set;
}
}
class Concrete : Abstract
{
public override int X
{
get
{
Console.Write(" GET");
return 10;
}
set
{
Console.Write(" SET");
}
}
}
class MyClient
{
public static void Main()
{
Concrete c1 =
new Concrete();
c1.X = 10;
Console.WriteLine(c1.X);
//Displays 'SET GET 10'
}
}

The properties are an important features added in language level inside C#. They are very useful in GUI programming. Remember that the compiler actually generates the appropriate getter and setter methods when it parses the C# property syntax.

This lesson teaches C# Properties in 4.0

This Link Will Help You to understand in deeply how Properties work....


@GAURAV_TARNTARAN

This article describes some features and architecture of IIS 7.0 and deployment of ASP.NET sites on IIS

This Link will Help You to see whats happning inside IIS7.0 although 7.5 is in the market but base is this so must read this link below
http://www.codeproject.com/KB/aspnet/IIS7ASPNet.aspx

@Gaurav_TarnTaran

Tuesday, June 7, 2011

Asp.net Page Life Cycle

The life cycle may be broken down into Stages and Events. The stages reflect the broad spectrum of tasks performed. The following stages take place

1) Page Request – This is the first stage, before the page life cycle starts. Whenever a page is requested, ASP.NET detects whether the page is to be requested, parsed and compiledor whether the page can be cached from the system.

2) Start – In this stage, properties such as Request and Response are set. Its also determined at this stage whether the request is a new request or old, and thus it sets theIsPostBack property in the Start stage of the page life cycle.

3) Page Initialization – Each control of the page is assigned a unique identification ID. If there are themes, they are applied. Note that during the Page Initialization stage, neither postback data is loaded, nor any viewstate data is retrieved.

4) Load – If current request is a postback, then control values are retrieved from their viewstate.

5) Validation – The validate method of the validation controls is invoked. This sets the IsValidproperty of the validation control.

6) PostBack Event Handling – Event handlers are invoked, in case the request is a postback.

7) Rendering – Viewstate for the page is saved. Then render method for each control is called. A textwriter writes the output of the rendering stage to the output stream of the page’s Response property.

8) Unload – This is the last stage in the page life cycle stages. It is invoked when the page is completely rendered. Page properties like Respone and Request are unloaded.

-------------------------------------------------------------------------------------------------------------------------

Note that each stage has its own events within it. These events may be used by developers to handle their code. Listed below are page events that are used more frequently.

PreInit – Checks the IsPostBack property. To create or recreate dynamic controls. To set master pages dynamically. Gets and Sets profile propety values.

Init – Raised after all controls are initialized, and skin properties are set.

InitComplete – This event may be used, when we need to be sure that all initialization tasks are complete.

PreLoad – If processing on a control or a page is required before the Load event.

Load – invokes the OnLoad event on the page. The same is done for each child control on the page. May set properties of controls, create database connections.

Control Events – These are the control specific events, such as button clicks, listbox item selects etc.

LoadComplete – To execute tasks that require that the complete page has been loaded.

PreRender – Some methods are called before the PreRenderEvent takes place, likeEnsureChildControls, data bound controls that have a dataSourceId set also call theDataBind method.

Each control of the page has a PreRender event. Developers may use the prerender event to make final changes to the controls before it is rendered to the page.

SaveStateComplete – ViewState is saved before this event occurs. However, if any changes to the viewstate of a control is made, then this is the event to be used. It cannot be used to make changes to other properties of a control.

Render – This is a stage, not an event. The page object invokes this stage on each control of the page. This actually means that the ASP.NET server control’s HTML markup is sent to the browser.

Unload – This event occurs for each control. It takes care of cleanup activities like wiping the database connectivities.