Body Onload

Discussion in 'ASP .Net' started by Arne Garvander, Sep 25, 2008.

  1. I have an asp.net page with a master page.
    How do I dynamically create an HTML body onload event?
    <body onload="CalcTotal()";

    --
    Arne Garvander
    (I program VB.Net for fun and C# to get paid.)
     
    Arne Garvander, Sep 25, 2008
    #1
    1. Advertising

  2. If you give the body tag an id and runat="server" you can do it from either
    the Master Page's Load or Init event or the Content Page's PreInit event.
    You will do this by using the body tag's Attributes property. Good Luck!
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Arne Garvander" <> wrote in message
    news:...
    >I have an asp.net page with a master page.
    > How do I dynamically create an HTML body onload event?
    > <body onload="CalcTotal()";
    >
    > --
    > Arne Garvander
    > (I program VB.Net for fun and C# to get paid.)
     
    Nathan Sokalski, Sep 25, 2008
    #2
    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. Fabio R.
    Replies:
    0
    Views:
    843
    Fabio R.
    Mar 25, 2005
  2. UJ
    Replies:
    4
    Views:
    9,703
    =?Utf-8?B?U3JlZWppdGggUmFt?=
    Jul 19, 2005
  3. David Otton

    window.onload and body.onload differences

    David Otton, Nov 4, 2004, in forum: Javascript
    Replies:
    2
    Views:
    614
    Martin Honnen
    Nov 4, 2004
  4. Replies:
    5
    Views:
    316
    Thomas 'PointedEars' Lahn
    May 15, 2005
  5. marco

    onload -->* no onload

    marco, Jun 22, 2006, in forum: Javascript
    Replies:
    7
    Views:
    228
    marco
    Jun 24, 2006
Loading...

Share This Page