if I want to add controls programmatically to a asp.net page, how would i position them? using a panel?

cbrune
cbrune used Ask the Experts™
on
if I want to add controls programmatically to a asp.net page, how would i position them? using a panel?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
SwapnilSoftware Architect
Top Expert 2005
Commented:
Hi cbrune,

         Yes, you can use panel / placeholder to add content dynamically and position them on the page. Panel / placeholder works as container so you can add controls in that container and place them wherever you want on the page.
Here is the link where you can find step by step instruction.
http://msdn.microsoft.com/en-us/library/kyt0fzt1.aspx

Thanks,
netswap
Commented:
You should also be able to use any html container control, such as a DIV or even a table.  All you need to do, is give the particular html element an ID, and add the runat="server" property, and you will then be able to access that element from your code-behind.
Which-ever you prefer. :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial