Page.PreInit Evento

Definição

Ocorre antes da inicialização da página.Occurs before page initialization.

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

Tipo de evento

EventHandler

Comentários

Esse evento permite que você verifique as condições da solicitação de página, como se a página está sendo carregada em resposta a um postback.This event enables you to check conditions of the page request, such as whether the page is being loaded in response to a postback. Você também pode verificar os valores das propriedades de perfil.You can also check the values of profile properties.

O evento permite que você defina valores que são usados posteriormente no ciclo de vida da página.The event enables you to set values that are used later in the page life cycle. Você pode definir dinamicamente uma página mestra ou um tema para a página solicitada e criar controles dinâmicos.You can dynamically set a master page or a theme for the requested page, and create dynamic controls.

Para obter mais informações sobre como o PreInit evento se encaixa no ciclo de vida do ASP.net, consulte visão geral do ciclo de vida da página ASP.net.For more information about how the PreInit event fits into the ASP.NET life cycle, see ASP.NET Page Life Cycle Overview.

Aplica-se a

Confira também