Safe to have client-side AND server-side page load event procedures?

Discussion in 'ASP .Net' started by Fred, Jul 12, 2004.

  1. Fred

    Fred Guest

    I'm combining the functionality of two existing aspx pages into one new
    page.

    One of the existing pages has a server-side Page_Load event procedure.
    The other has <body onload="Init();"> (and Init() is of course a client-side
    function).

    Just wondering if it would be a mistake to try to have both of these
    procedures (Page_Load and <body onload...>) in the new aspx page. Is there
    anything wrong with doing it? Is it perfectly safe?

    Thanks.
    Fred, Jul 12, 2004
    #1
    1. Advertising

  2. Fred

    Curt_C [MVP] Guest

    perfectly acceptable. They are doing their thing at different times anyway.

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "Fred" <> wrote in message
    news:...
    > I'm combining the functionality of two existing aspx pages into one new
    > page.
    >
    > One of the existing pages has a server-side Page_Load event procedure.
    > The other has <body onload="Init();"> (and Init() is of course a

    client-side
    > function).
    >
    > Just wondering if it would be a mistake to try to have both of these
    > procedures (Page_Load and <body onload...>) in the new aspx page. Is there
    > anything wrong with doing it? Is it perfectly safe?
    >
    > Thanks.
    >
    >
    Curt_C [MVP], Jul 12, 2004
    #2
    1. Advertising

  3. On Mon, 12 Jul 2004 11:38:51 -0700, Fred
    <> wrote:

    > I'm combining the functionality of two existing aspx pages into one new
    > page.
    >
    > One of the existing pages has a server-side Page_Load event procedure.
    > The other has <body onload="Init();"> (and Init() is of course a
    > client-side
    > function).
    >
    > Just wondering if it would be a mistake to try to have both of these
    > procedures (Page_Load and <body onload...>) in the new aspx page. Is
    > there
    > anything wrong with doing it? Is it perfectly safe?
    >
    > Thanks.
    >
    >

    They're totally separate from each other. The Page_Load is the ASP.NET
    page's server side loading, while the other (body onload) is when the
    resulting HTML page is loaded in the client browser. They completely
    different 'concepts' and don't impact each other directly.

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
    Craig Deelsnyder, Jul 12, 2004
    #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. =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=
    Replies:
    2
    Views:
    6,465
    rick74
    May 27, 2008
  2. Lau Alvin
    Replies:
    4
    Views:
    539
  3. Stuart Whiteford
    Replies:
    2
    Views:
    734
    Stuart Whiteford
    Apr 25, 2006
  4. Aymer
    Replies:
    1
    Views:
    376
    Alvin Bruney
    Sep 19, 2003
  5. Guest

    Fire server side event before client side event

    Guest, Mar 17, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    570
    Ken Cox [Microsoft MVP]
    Mar 18, 2005
Loading...

Share This Page