Control.Load Evento

Definizione

Viene generato quando il controllo server è caricato nell'oggetto Page.

public:
 event EventHandler ^ Load;
public event EventHandler Load;
member this.Load : EventHandler 
Public Custom Event Load As EventHandler 

Tipo evento

Esempio

// This is the constructor for a custom Page class. 
// When this constructor is called, it associates the Control.Load event,
// which the Page class inherits from the Control class, with the Page_Load
// event handler for this version of the page.
public MyPage()
{
   Load += new EventHandler(Page_Load);
}
' This is the constructor for a custom Page class. 
' When this constructor is called, it associates the Control.Load event,
' which the Page class inherits from the Control class, with the Page_Load
' event handler for this version of the page.
Public Sub New()
   AddHandler Load, AddressOf Page_Load
End Sub

Commenti

Notifica al controllo server di eseguire tutti i passaggi di elaborazione impostati per ogni richiesta di pagina. È possibile accedere alle informazioni sullo stato e ai dati POST del modulo Web da questo evento. È anche possibile accedere ad altri controlli server all'interno della gerarchia di controllo della pagina.

Nota

Se si imposta un modello personalizzato in un controllo durante l'evento Page_Load , i valori di testo dei controlli figlio nel modello personalizzato andranno persi. Ciò si verifica perché i valori del modulo sono già stati caricati.

Si applica a

Vedi anche