locked
How do you control the placement of controls in a user define control RRS feed

  • Question

  • User-1794555797 posted

    I have a user define control.  I put the control on the (C# Visual Studio 2008) page where I want them. When I run the program, the controls are all over the page.  How do I place them where they do not move form where I put them?

    Wednesday, July 16, 2008 11:41 AM

Answers

  • User1174340047 posted

    hi,

    there are absolute and Relative position in html. I guess you must use relative position. For example, at design-time, you place a TextBox below an Image, at run-time, no matter what size is the image, the TextBox is alway below the image, so the TextBox's position in design-time and run-time is different.

    You can get much greater detail in http://msdn.microsoft.com/en-us/library/ms533005.aspx

    Hope this can solve your problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 17, 2008 1:04 AM

All replies

  • User-1776072412 posted

    You'll need to study the HTML output and see what it's producing, then start to look at how to do an HTML layout.

    Wednesday, July 16, 2008 11:54 AM
  • User1174340047 posted

    hi,

    there are absolute and Relative position in html. I guess you must use relative position. For example, at design-time, you place a TextBox below an Image, at run-time, no matter what size is the image, the TextBox is alway below the image, so the TextBox's position in design-time and run-time is different.

    You can get much greater detail in http://msdn.microsoft.com/en-us/library/ms533005.aspx

    Hope this can solve your problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 17, 2008 1:04 AM
  • User481221548 posted

    Hi there

    Use (X)HTML _and_ CSS to positioning all Elements.

    @MyCrystal
    There is also the "static" as Default.

    Thursday, July 17, 2008 9:09 AM
  • User1174340047 posted

    hi, peter

    i know there is also fixed position, but i don't know the "static".

    Can you provide some links about it? Thank you.

    Thursday, July 17, 2008 10:01 AM
  • User481221548 posted

    Hi there

    Yep, fixed is too out here :)

    static is de default value, see:

    Thursday, July 17, 2008 10:48 AM