Masterpage Body onload ? Setting from contentpage?

Discussion in 'ASP .Net' started by jobs, Oct 13, 2007.

  1. jobs

    jobs Guest

    Hello.

    How can a set the Body onload from a content page since Body is on the
    masterpage?

    on my master page:

    <body runat="server" id="Body" >

    How can I reference Body. on the content page's codebehind?

    Thanks for any help or information.
     
    jobs, Oct 13, 2007
    #1
    1. Advertising

  2. "jobs" <> wrote in message
    news:...

    > How can a set the Body onload from a content page since Body is on the
    > masterpage?
    >
    > on my master page:
    >
    > <body runat="server" id="Body" >
    >
    > How can I reference Body. on the content page's codebehind?


    ((HtmlGenericControl)Master.FindControl("Body")).Attributes["onload"] =
    <whatever>;


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Oct 13, 2007
    #2
    1. Advertising

  3. jobs wrote:
    > Hello.
    >
    > How can a set the Body onload from a content page since Body is on the
    > masterpage?
    >
    > on my master page:
    >
    > <body runat="server" id="Body" >
    >
    > How can I reference Body. on the content page's codebehind?
    >
    > Thanks for any help or information.
    >


    ((ClassOfYourMasterPage)Master).Body

    --
    Göran Andersson
    _____
    http://www.guffa.com
     
    =?ISO-8859-1?Q?G=F6ran_Andersson?=, Oct 13, 2007
    #3
  4. jobs

    jobs Guest

    works great. Thanks.
     
    jobs, Oct 13, 2007
    #4
    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. Replies:
    1
    Views:
    505
    Scott Allen
    Nov 22, 2005
  2. User
    Replies:
    9
    Views:
    10,446
  3. dawg1998
    Replies:
    2
    Views:
    3,625
    zehramb
    May 31, 2010
  4. =?Utf-8?B?ZGF3ZzE5OTg=?=
    Replies:
    0
    Views:
    489
    =?Utf-8?B?ZGF3ZzE5OTg=?=
    Mar 15, 2006
  5. Replies:
    7
    Views:
    13,189
    TuckWong
    Jan 11, 2013
Loading...

Share This Page