How do i position a user control - ascx control.

Discussion in 'ASP .Net' started by John Blair, Jan 28, 2005.

  1. John Blair

    John Blair Guest

    Hi,

    I am trying to create a generic page footer control. But whenever i include
    it in a page it always appears at the top of the page - how do i go about
    positioning it at the footer - the control is a simple table. code below:
    Thanks!

    <TABLE WIDTH="100%" BGCOLOR="#dbeaf5" BORDER="0" CELLSPACING="0"
    CELLPADDING="0" style=" HEIGHT: 0.5in"
    id="myheader">
    <TR>
    <TD style="FONT-SIZE: larger">Instant Solutions Ltd</TD>
    </TR>
    </TABLE>
     
    John Blair, Jan 28, 2005
    #1
    1. Advertising

  2. Put a placeholder control at the bottom of the page at design time.
    Then at runtime you can use some code kinda like this:

    MyPlaceHolder.Controls.Add(MyUserControl)

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "John Blair" <> wrote in message
    news:s4vKd.332$...
    > Hi,
    >
    > I am trying to create a generic page footer control. But whenever i
    > include it in a page it always appears at the top of the page - how do i
    > go about positioning it at the footer - the control is a simple table.
    > code below: Thanks!
    >
    > <TABLE WIDTH="100%" BGCOLOR="#dbeaf5" BORDER="0" CELLSPACING="0"
    > CELLPADDING="0" style=" HEIGHT: 0.5in"
    > id="myheader">
    > <TR>
    > <TD style="FONT-SIZE: larger">Instant Solutions Ltd</TD>
    > </TR>
    > </TABLE>
    >
     
    Steve C. Orr [MVP, MCSD], Jan 28, 2005
    #2
    1. Advertising

  3. John Blair

    John Blair Guest

    Thanks a lot for your reply!

    I ended up putting a panel control at the bottom and then placing my footer
    control inside it! Thanks again.

    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > Put a placeholder control at the bottom of the page at design time.
    > Then at runtime you can use some code kinda like this:
    >
    > MyPlaceHolder.Controls.Add(MyUserControl)
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    > "John Blair" <> wrote in message
    > news:s4vKd.332$...
    >> Hi,
    >>
    >> I am trying to create a generic page footer control. But whenever i
    >> include it in a page it always appears at the top of the page - how do i
    >> go about positioning it at the footer - the control is a simple table.
    >> code below: Thanks!
    >>
    >> <TABLE WIDTH="100%" BGCOLOR="#dbeaf5" BORDER="0" CELLSPACING="0"
    >> CELLPADDING="0" style=" HEIGHT: 0.5in"
    >> id="myheader">
    >> <TR>
    >> <TD style="FONT-SIZE: larger">Instant Solutions Ltd</TD>
    >> </TR>
    >> </TABLE>
    >>

    >
    >
     
    John Blair, Jan 29, 2005
    #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. Quentin
    Replies:
    1
    Views:
    489
    Quentin
    Jul 29, 2003
  2. Jason Shohet
    Replies:
    1
    Views:
    485
    Kevin Spencer
    Nov 10, 2003
  3. Holger (David) Wagner
    Replies:
    2
    Views:
    1,944
    Holger (David) Wagner
    Jul 3, 2004
  4. Joe
    Replies:
    1
    Views:
    375
    Jeffrey Tan[MSFT]
    Feb 16, 2004
  5. Replies:
    2
    Views:
    539
Loading...

Share This Page