How to position textboxes that are created programmatically
-
Hi, I need some help on how to position a textbox, that I create in the VB 'code behind' page. My code:
public txttest as New TextBox Public Sub Control_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init test.width=200 me.controls.add(txttest) Page.DataBind() End Sub
How can I position this textbox, to diplay where I want it to be displayed. Say for instance in a certain table cell or in a div tag. Thanks -
Hi, I need some help on how to position a textbox, that I create in the VB 'code behind' page. My code:
public txttest as New TextBox Public Sub Control_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init test.width=200 me.controls.add(txttest) Page.DataBind() End Sub
How can I position this textbox, to diplay where I want it to be displayed. Say for instance in a certain table cell or in a div tag. ThanksTo position a control somewhere on the page you need to have some sort of a place holder (e.g. a panel, a table and so on). Just place a panel (per say) on the page and then use
panel.Controls.Add(textbox)