Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > When adding controls programmatically...

Reply
Thread Tools

When adding controls programmatically...

 
 
Rob Meade
Guest
Posts: n/a
 
      05-15-2007
...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


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      05-15-2007
On May 15, 11:23 am, "Rob Meade" <(E-Mail Removed)> wrote:
> ..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.

 
Reply With Quote
 
 
 
 
Rob Meade
Guest
Posts: n/a
 
      05-15-2007
"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


 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      05-15-2007
On May 15, 2:22 pm, "Rob Meade" <(E-Mail Removed)> wrote:
> "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!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controls.Count, Controls.IsSynchronized, and Controls.SyncRoot Nathan Sokalski ASP .Net 4 09-05-2007 03:27 AM
Adding controls to Page.Controls collection Jeremy Ames ASP .Net 5 03-05-2004 08:33 PM
Efficiency of dynamically adding web user controls MC D ASP .Net 4 11-18-2003 07:27 PM
Re: Adding attributes to asp controls David Archuleta ASP .Net 1 10-27-2003 01:40 AM
Dynamically adding controls to page SOURCE file John Wallace ASP .Net 0 08-06-2003 08:14 PM



Advertisments