Control.Load Událost

Definice

Nastane při načtení serverového ovládacího prvku do objektu Page .

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

Event Type

Příklady

// 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

Poznámky

Upozorní ovládací prvek serveru, aby provedl všechny kroky zpracování, které jsou nastaveny tak, aby se prováděly u každé žádosti o stránku. Z této události můžete získat přístup k informacím o stavu zobrazení a dat post webového formuláře. Můžete také přistupovat k jiným ovládacím prvkům serveru v rámci hierarchie ovládacích prvků stránky.

Poznámka

Pokud nastavíte vlastní šablonu v ovládacím prvku během Page_Load události, textové hodnoty podřízených ovládacích prvků ve vlastní šabloně budou ztraceny. K tomu dochází, protože hodnoty formuláře již byly načteny.

Platí pro

Viz také