Positioning web server controls at runtime

B

Bob Rosen

I would like to place some button controls on a web page underneath a
DataGrid control. Since the height of the DataGrid depends on the number of
rows displayed, which is determined by user selections, I need to set the
position of the button controls at runtime. With a Windows form I could do
it with:

Button.Top = Datagrid.Top + Datagrid.Height + <offset>

Unfortunately, the Top property is not provided for web server controls.
How, then, can I do it?

Bob Rosen
 
D

Dennis Myrén

You should rather than trying to compute it's position,
use flow layout and not absolute positions. Let the browser compute an
appropriate position instead of doing it yourself. Do not use the Design
View for the ASPX in Visual Studio.
Instead use the HTML view and manually write the HTML code.
 

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