Webform built-in object Session object, Application global object, ViewState, webformviewstate
Session
Each computer accesses the server with an independent session with the same key value and different content.
1. The session is saved on the server.
2. The session is not persistent and the storage period is 20 minutes.
Important: Do not abuse sessions. Abuse will cause Server Overflow and waste of resources.
Value assignment: Session ["key"] = value;
Value: string a = Session ["key"];
Clear: Session ["key"] = null;
Application
Application ["key"] indicates that all users obtain the same value in this key. It is saved without a storage period and is usually used as the version number.
Value assignment: Application ["key"] = value;
Value: Application. Get ("key ");
Repeater Command operation:
Example:
<ItemTemplate> <tr class = "tr_Item">
Background code:
If (e. commandName = "delete") // delete button {new UserDA (). delete (e. commandArgument. toString (); Repeater1.DataSource = new UserDA (). select (); Repeater1.DataBind ();} if (e. commandName = "xiugai") {new UserDA (). select (e. commandArgument. toString (); Repeater1.DataSource = new UserDA (). select (); Repeater1.DataBind ();}