469,932 Members | 2,758 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,932 developers. It's quick & easy.

When adding controls programmatically...

...does it matter which order?

ie...

I create a table/tablerow/tablecell, I then create a new update panel, I
create a drop down list, I add list items to the drop down list, I then add
the drop down list to the update panel. The update panel is then added to a
table cell, I then create another drop down list, and add it to the update
panel, the table cell is then added to the row, the row to the table.

When I run my code and look at the source the second drop down list is not
within the <div</divtags, thus not in the update panel - any thoughts?

Regards

Rob
May 15 '07 #1
3 1856
On May 15, 11:23 am, "Rob Meade" <ku.shn.tsews.t...@edaem.borwrote:
..does it matter which order?

ie...

I create a table/tablerow/tablecell, I then create a new update panel, I
create a drop down list, I add list items to the drop down list, I then add
the drop down list to the update panel. The update panel is then added to a
table cell, I then create another drop down list, and add it to the update
panel, the table cell is then added to the row, the row to the table.

When I run my code and look at the source the second drop down list is not
within the <div</divtags, thus not in the update panel - any thoughts?

Regards

Rob
Do you mean that it's not shown on the page, or it is shown outside
the panel?

A code can help to answer.

May 15 '07 #2
"Alexey Smirnov" wrote ...
Do you mean that it's not shown on the page, or it is shown outside
the panel?
The drop down list in question was displayed on the page, but not in the
updatePanel in the first table cell. I've subsequently realised where I'd
gone wrong...

I was adding the second drop down list to the update panel which was
correct, but then I had another line of code which was adding the same drop
down list to the second table cell - it would seem that rather than generate
an error message about the same control being on the page with the same ID,
instead it *didn't* add it to the updatePanel in favour of adding it to the
table cell as this was the order of the code etc...

All working now...

Thanks for your reply Alexey.

Regards

Rob
May 15 '07 #3
On May 15, 2:22 pm, "Rob Meade" <ku.shn.tsews.t...@edaem.borwrote:
"Alexey Smirnov" wrote ...
Do you mean that it's not shown on the page, or it is shown outside
the panel?

The drop down list in question was displayed on the page, but not in the
updatePanel in the first table cell. I've subsequently realised where I'd
gone wrong...

I was adding the second drop down list to the update panel which was
correct, but then I had another line of code which was adding the same drop
down list to the second table cell - it would seem that rather than generate
an error message about the same control being on the page with the same ID,
instead it *didn't* add it to the updatePanel in favour of adding it to the
table cell as this was the order of the code etc...

All working now...

Thanks for your reply Alexey.

Regards

Rob
Ok, good that you solved it!

May 15 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Big D | last post: by
2 posts views Thread by Tim Marsden | last post: by
2 posts views Thread by Chakravarti Mukesh | last post: by
2 posts views Thread by johnb41 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.