SESSION

SESSION

From transfer data between one page to another page is called session.

Two type of session 

1)Session Creation
2)Session Calling

make two page in 1st page create textbox and button and in 2nd create label.

create session 
Syntax:- session["var"]=value;
e.g.-session["email"]=TextBox1.Text;

2)On button click
session["email"]=TextBox1.Text;

3)for going one page to another
Response.Redirect("default.aspx");

Session Calling
For performing action on page 

Load Event:
Execute on spot action
 click any where on page then open two.aspx.cs then write code on load_page

Label1.Text=(string)session["email"];


Popular Posts