Hi moondaddy,
Thank you for using MSDN Newsgroup! My name is Steven, and I'll be
assisting you on this issue.
From your description, you add a UserControl onto a webpage, and you'd like
to manually control the position of the UserControl to some certain place
on the page?
If there is anything I misunderstood, please feel free to let me know.
Based on my experience, I think there're several means to help implement
the controls' position on a web page.
1. Using the table to control the page layout and structure. I always think
this the most wonderfully way when dealing with the page's layout. Since
the table can be embed each other and for many hierarchy. You can put a
large table in a page to perform the main layout and then in the large
table's cells, put some small table to perform the detailed layout
operations. As for the problem in our issue, you may try putting the
UserControl in a certain table cell to position it. Also. one of the
advantages of using table to perform layout is the table can adjust itself
in with of height when the page is resized.(table can derived the width and
height from its parent/container control).
2. If you do think it better to use absolute position mode to specify the
UserControl's position, I think you may try use a "<div>" tag. The div
elment can set its "style" attribute to specify its absolute position on a
page. For example:
<div style="LEFT: 300px; WIDTH: 200px; POSITION: absolute; TOP: 300px;
HEIGHT: 200px">
Hello, I am a Div!
</div>
This is a simple div, we set its absolute position as (300,300) on the
page.Then , you can put your UserControl in the div so as to position it.
And also we can specify the "height" and "width" attribute. There are still
many other good features of the "<div>" element, for detailed information,
you can view the following reference in MSDN:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ref
erence/objects/div.asp
Please check out the preceding suggestions. If you have any questions or
need any further help, please feel free to let me know.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)