State Management

 v State Management :-

1. It is used to transferring data   between one page to another pages.

2. Dot net framework uses sometypes of state management.which are given below:-

I. Session

II. Cookies

III. Application state

IV. Querry string

V. View state

 

u Session :-

I. It is a state management process.

II. Session time limit is 60 sec by default

III. Session is to be created inside the event.

IV.  It is always access  inside the PAGELOAD EVENT.

u How to create Session.

Syntax:- Session [“variable”]=control;

Ex.Session[“email”]=textbox1.text;

 

u How to access Session.

Syntax:-Control=(string)Session[“Variable”];

Ex.

Label1.text=(string)Session[“email”];

² How to create mutilple session.

Prog:-

 

            Session["Email"] = TextBox1.Text;

 

            Session["Mobile"] = TextBox2.Text;

            Response.Redirect("page2.aspx");

 

Ø How to Clear Session.

Generally used logout concept.

Comments

Popular posts from this blog

l 3-tier architecture (TIER)

New html

Database joining