Registers the associated System.Web.UI.WebControls.Menu control as one that requires control state.
- e
- The EventArgs data associated with this event.
The MenuAdapter.OnInit(EventArgs) method registers the associated control as one that requires control state. By default, the .NET Framework calls the Web server control's own System.Web.UI.Control.OnInit(EventArgs) method. However, after the System.Web.UI.Control.Adapter property of the server control is set, the .NET Framework will call the adapter's implementation of the System.Web.UI.Control.OnInit(EventArgs) method instead of the control's implementation.
Use the MenuAdapter.OnInit(EventArgs) method to initialize settings in the control. During a postback, this is an important phase for managing interaction with existing view-state data. For more information, see Architectural Overview of Adaptive Control Behavior.