Dynamically positioning objects at run-time.

B

Bill Zack

I have an interesting little ASP.NET problem.

I have to position and show multiple "frames" in an IE6 browser at run
time in a singe ASP.NET page. Each "frame" will contain a couple of
navigation links and one chart object (currently an ActiveX control
but we will be switching to native .NET controls soon). The number of
frames shown on the page will be selected by the user dynamically at
run time.

What I need to do is define a myFrame object that takes x location, y
location, width and height parameters at run time to position and size
the myFrame in the window. I also need to scale the set of myFrames
to fill the window. Width and Height are valid run-time parameters.
X location and Y location, however, are part of the Style parameter
which is read-only. (I have not figured out how to change it.)

I need to come up with an answer, even if it is to render the html
myself or use JavaScript. I am hoping that there is a more elegant
way to do this using ASP.NET.

Thanks
Bill Zack
 
J

Jacob Yang [MSFT]

Hi Bill,

Thank you for posting to the MSDN newsgroups.

I am interested in this issue and researching on it now. I will update you
as soon as possible.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
J

Jacob Yang [MSFT]

Hi Bill,

Based on my research and experience, we can use the iframe object. Please
refer to the following information carefully.

IFRAME Element | iframe Object
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ref
erence/objects/iframe.asp
"...
Style attribute Style property Description
...
left left Sets or retrieves the
position of the object relative to the left edge of the next positioned
object in the document hierarchy.
...
top top Sets or retrieves the
position of the object relative to the top of the next positioned object in
the document hierarchy.
...
"

Using IFRAME Elements
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ove
rview/inlinefloatingframes.asp

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
B

Bill Zack

Thanks for the advice.

It looks like positioning and sizing a set of IFrames will do the
trick. I plan to tell each one what to actually load into the IFRAME
by specifying an aspx page with query string parameters in the url.
The aspx page will then dynamicaly load a user control (ascx) in the
page.

The user controled resizing logic to fit the frames on the page will
be fun to write!

Thanks again
Bill Zack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top