I’m adding a serires of asp:literal and asp:textbox controls to a panel in code as below (the eventual aim being to add only some of the controls depending on the user):
With Me.pnl1
Controls.Add(FirstLiteral)
Controls.Add(FirstTxtBox)
Controls.Add(SecondLiteral)
Controls.Add(SecondTxtBox)
Controls.Add(ThirdLiteral)
Controls.Add(ThirdTxtBox)
End With
The intention is to have each control on its own line but I’m getting a mixed up layout like so:
FirstLiteral
FirstTxtbox SecondLiteral
SecondTxtbox thirdLiteral
thirdtxtbox
How can I control how the panel is rendered, preferably without having to create a custom control?
Thanks,
Patrick
For each control added You will have to add something like