1. AutoEventWireup = "true" in the Page command. The default value of this command is true.
Instructions
Page eventsWhether to bind automatically. True if event auto binding is enabled; otherwise, false. The default value is true.
Page event binding
The ASP. NET page triggers lifecycle events such as Init, Load, and PreRender. By default, You can bind a Page event to a method using the Page _ event naming convention. For example, to create a handler for the page Load event, you can create a method named Page_Load. During compilation, ASP. NET searches for methods based on this naming convention and automatically executes the binding between events and methods. You can use the Page _ event name Convention for any events exposed by the Page class.
The disadvantage of the AutoEventWireup attribute is that it requires the page event handler to have a specific and predictable name. This limits the flexibility in naming event handlers.
| Note: |
|
If explicit binding of page events is included, make sure that the AutoEventWireup attribute is set to false so that the method is not accidentally called twice. |
Explicit binding of page events:
(When the AutoEventWireup attribute is set to false, the Page_Load method will not be called according to the naming convention. In this case, we need to display the setting) public partial class _ Default: System. Web. UI. Page {
Public _ Default ()
{
This. Load + = new EventHandler (Page_Load );
}
Protected void Page_Load (object sender, EventArgs e)
{
}
}
IIMembership role and permission management
Address: http://www.blueidea.com/tech/program/2007/4676.asp
Profile in asp.net
Personalized Configuration
Http://www.360doc.com/content/090810/19/163747_4816186.html
4 internal secrets of ASP. NET AJAX
Http://www4.it168.com/jtzt/shenlan/tech/asp.net_ajax/index.html