When adding controls programmatically...

R

Rob Meade

...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> </div> tags, thus not in the update panel - any thoughts?

Regards

Rob
 
G

Guest

..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> </div> tags, 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.
 
R

Rob Meade

...
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
 
G

Guest

...


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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top