Where can I find these events

Discussion in 'ASP .Net' started by Tony Johansson, Dec 2, 2010.

  1. 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
    Tony Johansson, Dec 2, 2010
    #1
    1. Advertising

  2. On Thu, 2 Dec 2010 15:38:16 +0100, "Tony Johansson"
    <> 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.
    Registered User, Dec 2, 2010
    #2
    1. Advertising

  3. "Registered User" <> skrev i meddelandet
    news:...
    > On Thu, 2 Dec 2010 15:38:16 +0100, "Tony Johansson"
    > <> 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
    Tony Johansson, Dec 2, 2010
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad
    Replies:
    2
    Views:
    849
  2. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    340
    Chris
    Aug 30, 2005
  3. Wybo Dekker
    Replies:
    1
    Views:
    340
    Yukihiro Matsumoto
    Nov 15, 2005
  4. vdvorkin
    Replies:
    0
    Views:
    389
    vdvorkin
    Feb 10, 2011
  5. Travis
    Replies:
    16
    Views:
    545
Loading...

Share This Page