Body Onload

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

  1. I have an page with a master page.
    How do I dynamically create an HTML body onload event?
    <body onload="CalcTotal()";
    Arne Garvander, Sep 25, 2008
    1. Advertisements

  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, Sep 25, 2008
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.