Where can I find these events

T

Tony Johansson

Hello!

Normally all events can be found in the lightning bold in the property page
but how can I find these.

protected void Page_Load(object sender, EventArgs e)
{
}

protected void Page_Init(object sender, EventArgs e)
{
}

protected void Page_PreRender(object sender, EventArgs e)
{

}

//Tony
 
R

Registered User

Hello!

Normally all events can be found in the lightning bold in the property page
but how can I find these.

protected void Page_Load(object sender, EventArgs e)
{
}

protected void Page_Init(object sender, EventArgs e)
{
}

protected void Page_PreRender(object sender, EventArgs e)
{

}
ASP.NET webforms do not make use of property pages like ,NET winforms
do. The Page_Load method is automatically stubbed out when the page is
added to the project.

Page_Init and Page_PreRender are the names of specific events which
have pre-existing event handlers at lower levels. These event handlers
are prefixed with On and can be overridden. In the page's .cs files
type override as if you're adding a new method. Hitting the space bar
will bring up Intellisense. Select OnPage_Init and an overridden
handler will be stubbed out. Do the same thing and select
OnPage_PreRender and that overridden handler will be stubbed out as
well.

regards
A.G.
 
T

Tony Johansson

Registered User said:
ASP.NET webforms do not make use of property pages like ,NET winforms
do. The Page_Load method is automatically stubbed out when the page is
added to the project.

Page_Init and Page_PreRender are the names of specific events which
have pre-existing event handlers at lower levels. These event handlers
are prefixed with On and can be overridden. In the page's .cs files
type override as if you're adding a new method. Hitting the space bar
will bring up Intellisense. Select OnPage_Init and an overridden
handler will be stubbed out. Do the same thing and select
OnPage_PreRender and that overridden handler will be stubbed out as
well.

regards
A.G.

This was a good way but I noticed I can also do it in this way.

I can also use the page event but to be able to access the page event I
must view the Component designer for the page.
I get there by right clicking the given page and choose view Component
designer. Selecting this option open that page property window including the
events.

//Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top