PC Review


Reply
Thread Tools Rate Thread

Where can I find these events

 
 
Tony Johansson
Guest
Posts: n/a
 
      2nd Dec 2010
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


 
Reply With Quote
 
 
 
 
Registered User
Guest
Posts: n/a
 
      2nd Dec 2010
On Thu, 2 Dec 2010 15:38:16 +0100, "Tony Johansson"
<(E-Mail Removed)> wrote:

>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.
 
Reply With Quote
 
Tony Johansson
Guest
Posts: n/a
 
      2nd Dec 2010

"Registered User" <(E-Mail Removed)> skrev i meddelandet
news:(E-Mail Removed)...
> On Thu, 2 Dec 2010 15:38:16 +0100, "Tony Johansson"
> <(E-Mail Removed)> wrote:
>
>>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.


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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Do I Find MyApplication Events? Stewart Berman Microsoft VB .NET 10 17th Jul 2009 07:12 PM
How do I find Calendar events that have been put off with Snooze? Mike0317 Microsoft Outlook Calendar 1 9th Jul 2009 03:19 PM
How to find out what events are firing? Dorian Microsoft Access Form Coding 2 3rd Dec 2008 07:50 PM
Can I find all my recurring events? Stan Waisbrod Microsoft Outlook Discussion 2 3rd Feb 2005 12:22 PM
How to find out which events will fire MS News \(MS ILM\) Microsoft ASP .NET 3 30th Mar 2004 08:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:15 PM.