"Jax" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Lets say i have a list of objects of a variable size.
What I would like to do is create controls and add them to
the web page at run time that represent all the items in
the list.
Problem is everytime i do this:
this.Controls.Add(SomeControl);
The html ends up after the </HTML> tag. Therefore it
doesn't work properly. What do i have to do to make sure
the extra html ends up within the tags?
Read the documentation.
Use page trace output to see how things are built.
Your problem:
* The complete HTML content of a page is a control within your page*s
controls collection.
So, by adding your control THERE, you add it - beyond the page content.
What you need to od is - add it to a part within the controls hierarchy.
Use a trace (trace.axd, enable it first) to see how the control hierarchy
for your page looks in detail. It is way more complex (as in: thre are way
more controls) than you psosibly think at the moment.
Thomas Tomiczek
THONA Software & Consulting Ltd.
(Microsoft MVP C#/.NET)