communication between control and container

Discussion in 'ASP .Net Web Controls' started by Tariq Ahmad, Nov 11, 2003.

  1. Tariq Ahmad

    Tariq Ahmad Guest

    hi,

    i have a user control that sits on a webform page.

    how can the usercontrol get access to the attibutes of the
    <BODY> tag of the page that it is sitting in and modify the
    attributes? The <BODY> tag looks like this:

    <body id=bdBody runat="server">

    Protected WithEvents bdBody As
    System.Web.UI.HtmlControls.HtmlContainerControl

    effectively i want to know how i can access the bdBody variable from
    within the usercontrol.

    thnx.

    t.
     
    Tariq Ahmad, Nov 11, 2003
    #1
    1. Advertising

  2. Tariq Ahmad

    Teemu Keiski Guest

    Hi,

    CType(Page.FindControl("bdBody"),HtmlContainerControl)

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist


    "Tariq Ahmad" <> wrote in message
    news:...
    > hi,
    >
    > i have a user control that sits on a webform page.
    >
    > how can the usercontrol get access to the attibutes of the
    > <BODY> tag of the page that it is sitting in and modify the
    > attributes? The <BODY> tag looks like this:
    >
    > <body id=bdBody runat="server">
    >
    > Protected WithEvents bdBody As
    > System.Web.UI.HtmlControls.HtmlContainerControl
    >
    > effectively i want to know how i can access the bdBody variable from
    > within the usercontrol.
    >
    > thnx.
    >
    > t.
    >
    >
     
    Teemu Keiski, Nov 12, 2003
    #2
    1. Advertising

  3. Tariq Ahmad

    Tariq Ahmad Guest

    works a treat!

    thanks a lot.


    "Teemu Keiski" <> wrote in message
    news:%...
    > Hi,
    >
    > CType(Page.FindControl("bdBody"),HtmlContainerControl)
    >
    > --
    > Teemu Keiski
    > MCP, Microsoft MVP (ASP.NET), AspInsiders member
    > ASP.NET Forum Moderator, AspAlliance Columnist
    >
    >
    > "Tariq Ahmad" <> wrote in message
    > news:...
    > > hi,
    > >
    > > i have a user control that sits on a webform page.
    > >
    > > how can the usercontrol get access to the attibutes of the
    > > <BODY> tag of the page that it is sitting in and modify the
    > > attributes? The <BODY> tag looks like this:
    > >
    > > <body id=bdBody runat="server">
    > >
    > > Protected WithEvents bdBody As
    > > System.Web.UI.HtmlControls.HtmlContainerControl
    > >
    > > effectively i want to know how i can access the bdBody variable from
    > > within the usercontrol.
    > >
    > > thnx.
    > >
    > > t.
    > >
    > >

    >
    >
     
    Tariq Ahmad, Nov 12, 2003
    #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. Vivi Orunitia
    Replies:
    11
    Views:
    4,545
    Martijn Lievaart
    Feb 4, 2004
  2. Maitre Bart
    Replies:
    2
    Views:
    551
    Maitre Bart
    Feb 11, 2004
  3. Steven T. Hatton
    Replies:
    4
    Views:
    3,991
    Rob Williscroft
    Dec 5, 2004
  4. Replies:
    4
    Views:
    832
    Daniel T.
    Feb 16, 2006
  5. wolverine
    Replies:
    2
    Views:
    485
    Marcus Kwok
    Jul 24, 2006
Loading...

Share This Page