Positioning web server controls at runtime

  • Thread starter Thread starter Bob Rosen
  • Start date Start date
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
 
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.
 
Back
Top