assigning the position of a control in a webform

Oct 14 2005 4:28 AM
I want to dynamically control the position of my webform controls at runtime.  ".Top" isn't a property of these (webform) controls.  "Style" seems to be a read-only property.  I'm willing to dynamically create the control at runtime, but I can't find any methods/parameters that let me control the position.  And when I try dynamically creating a textbox, I get:

Control 'ControlID_1' of type 'TextBox' must be placed inside a form tag with runat=server.

Here's the code I used:

TextBox tx= new TextBox();
tx.ID = "ControlID_1";
Page.Controls.Add(tx);

Can anyone help with a complete example?

Thanx!