User Control Renders on Separate Line

Discussion in 'ASP .Net' started by jdp, Aug 4, 2006.

  1. jdp

    jdp Guest

    I've created a user control that I then place in a panel. The reason
    it's in a panel is that it's part of search criteria that I hide/show
    panels based on the type of search begin done. I can place a label
    next to this control in the IDE and it looks fine but when I run the
    app, the label is on the line above the control. I've tried placing
    the label INSIDE the control, placing the user control inside a <div>
    and allowing objects on either side and the same effect occurred.

    Any help would be greatly appreciated.

    Thanks.
     
    jdp, Aug 4, 2006
    #1
    1. Advertising

  2. If you want them to appear next to each other, the easiest solution is to
    build a two celled table.
    Put the label in the left cell and the control in the right hand cell.

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


    "jdp" <> wrote in message
    news:...
    > I've created a user control that I then place in a panel. The reason
    > it's in a panel is that it's part of search criteria that I hide/show
    > panels based on the type of search begin done. I can place a label
    > next to this control in the IDE and it looks fine but when I run the
    > app, the label is on the line above the control. I've tried placing
    > the label INSIDE the control, placing the user control inside a <div>
    > and allowing objects on either side and the same effect occurred.
    >
    > Any help would be greatly appreciated.
    >
    > Thanks.
    >
     
    Steve C. Orr [MVP, MCSD], Aug 4, 2006
    #2
    1. Advertising

  3. jdp

    jdp Guest

    Thanks for the reply.

    I'm writing this site that has to be accessible to people with
    disabilities. I'm under the impression that tables should only be used
    to render data. Would the solution you're suggesting no longer be
    valid or would the special screen readers interpret this correctly?

    Thanks again.


    Steve C. Orr [MVP, MCSD] wrote:
    > If you want them to appear next to each other, the easiest solution is to
    > build a two celled table.
    > Put the label in the left cell and the control in the right hand cell.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
     
    jdp, Aug 4, 2006
    #3
  4. In that case tables might not be such a great solution.
    Would absolute positioning help?

    Here's more info:
    http://SteveOrr.net/articles/ControlPositioning.aspx

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



    "jdp" <> wrote in message
    news:...
    > Thanks for the reply.
    >
    > I'm writing this site that has to be accessible to people with
    > disabilities. I'm under the impression that tables should only be used
    > to render data. Would the solution you're suggesting no longer be
    > valid or would the special screen readers interpret this correctly?
    >
    > Thanks again.
    >
    >
    > Steve C. Orr [MVP, MCSD] wrote:
    >> If you want them to appear next to each other, the easiest solution is to
    >> build a two celled table.
    >> Put the label in the left cell and the control in the right hand cell.
    >>
    >> --
    >> I hope this helps,
    >> Steve C. Orr, MCSD, MVP
    >> http://SteveOrr.net

    >
     
    Steve C. Orr [MVP, MCSD], Aug 4, 2006
    #4
  5. jdp

    jdp Guest

    Thanks, I'll give it a read.

    I don't know if you saw my other question in the other groups or not
    but I'm trying to build a user control where, at design time, a
    developer modifying a property will see those changes immediately
    rather than at run time. For example, the control has a label in it
    and the control exposes a LabelText property. If I set this property
    at design time, I don't see the change until run time.

    Any thoughts you might have or are able to point me in the right
    direction would be greatly appreciated.

    Thanks again.

    Steve C. Orr [MVP, MCSD] wrote:
    > In that case tables might not be such a great solution.
    > Would absolute positioning help?
    >
    > Here's more info:
    > http://SteveOrr.net/articles/ControlPositioning.aspx
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
     
    jdp, Aug 7, 2006
    #5
  6. jdp

    jdp Guest

    I found my problem: the user control had a <div> element defined. Once
    I removed that, everything works great!

    Thanks for you help!


    Steve C. Orr [MVP, MCSD] wrote:
    > In that case tables might not be such a great solution.
    > Would absolute positioning help?
    >
    > Here's more info:
    > http://SteveOrr.net/articles/ControlPositioning.aspx
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
     
    jdp, Aug 8, 2006
    #6
    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. EvgueniB
    Replies:
    1
    Views:
    655
    Anthony Borla
    Dec 15, 2003
  2. Frank Fredstone
    Replies:
    1
    Views:
    460
    Jean-Francois Briere
    Jun 27, 2006
  3. jdp

    User Control Renders On Separate Line

    jdp, Aug 4, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    106
  4. Nigil LaVey
    Replies:
    0
    Views:
    115
    Nigil LaVey
    Nov 5, 2003
  5. jdp

    User Control Renders on Separate Line

    jdp, Aug 4, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    123
    Ken Cox [Microsoft MVP]
    Aug 11, 2006
Loading...

Share This Page