Modifica

Condividi tramite


MenuAdapter.Control Property

Definition

Retrieves a strongly typed reference to the Menu control associated with this MenuAdapter object.

protected:
 property System::Web::UI::WebControls::Menu ^ Control { System::Web::UI::WebControls::Menu ^ get(); };
protected System.Web.UI.WebControls.Menu Control { get; }
member this.Control : System.Web.UI.WebControls.Menu
Protected ReadOnly Property Control As Menu

Property Value

The Menu control associated with the current MenuAdapter object.

Examples

The following code example demonstrates how to use the Control property to retrieve the Menu control of the parent class. This code example is part of a larger example provided for the MenuAdapter class.

protected new System.Web.UI.WebControls.Menu Control
{
    get
    {
        return (System.Web.UI.WebControls.Menu)base.Control;
    }
}
Protected Overloads ReadOnly Property Control() As _
    System.Web.UI.WebControls.Menu

    Get
        Return CType( _
            MyBase.Control, _
            System.Web.UI.WebControls.Menu)
    End Get
End Property

Remarks

The Control property provides a way to reference the adapter's corresponding control. When an adapter is associated with a particular control, the .NET Framework will call the life-cycle methods of the adapter in place of or in addition to the life-cycle methods of the control.

Applies to

See also