Session: Transfer values between different browsers, such as banks and other sites to secure the user name password stored in the session.
Each computer accesses the server, it will be a separate set of Session,key values are the same, but the content is not the same
All of the above is the same as cookies.
Not the same:
1, the session save location is saved on the server
2, the session does not have a lasting, its preservation period is 20 minutes
Focus: Do not abuse the session, do not use, misuse may cause server content overflow, do not cause waste of resources, the session uses the server's memory, because in-memory data extraction and interaction is the fastest, use properly can improve the browsing speed.
Assignment: session["key"] = value;
Value: String a = session["key"];
Clear: session["key"]=null;
Application:
Global objects
application["Key"] is all the user gets the value of this key is the same
There is no save cycle, it will always be saved, for example: The version number can exist in this kind of
Assignment value: application["key"]= value;
Value: Application.get ("key");
ViewState: (as an understanding)
Understanding as a case
Similar to the middle process, due to the Web page is not fixed, the click button will refresh, the control is assigned to the value of the Iewstate save, the value before the refresh to save a special code. Refresh and assign a value to the control
Command operation for Repeater:
1. ItemCommand event-All the controls that can trigger events in Repeater will trigger this event
2, CommandName-Judge what button is clicked, E.commandname
3. CommandArgument-The primary key value data passed by the triggering event, put it in the face.
Bound with a single quotation mark!
CommandName to classify buttons
CommandArgument will select the data, pass the value
4. ItemCreated-the event will be executed once the HTML code is generated in the item template
5. ItemDataBound-Item template to execute this event once data is bound
Application, session, Iewstate, and Commang usage of repeater