DEFAULT.ASPX1, which reflects the principle of code and form separation. 2, independent of the user control independently of the form element
The Default page gives personalized information by finding cookies when initialization. Private void Page_load (Object Sender, System.Eventargs E) {
// Customize welcome message if personalization cookie is present if (! Request.Cookies [ "IBuySpy_FullName"] = null) {WelcomeMsg.Text = "Welcome" Request.Cookies [ "IBuySpy_FullName"] Value;.}} Here is the use of Request technology.
Page_init, the difference between Page_Load is that only the individual controls are loaded only in Page_Load. Although we can access controls in page_init events, but ViewState will not be loaded, so the controls still maintain their default, that is, after Postback, each control is still those default values.