Iterate User control's controls

Results 1 to 2 of 2

Thread: Iterate User control's controls

  1. #1
    Join Date
    Dec 1969

    Default Iterate User control's controls

    Hi,<BR><BR>I dynamically create user controls and add them to an html table at runtime. <BR>The user control contains a datalist which I want to populate before adding<BR>to the html table. Would I need to first add the control to the pages control<BR>list and then iterate thru all of the forms control in order to get a handle to<BR>the datalist, and then bind, or can i use the instance of the user control i just<BR>created, iterate thru its controls(as it is a container ie html table), find the <BR>datalist and then populate? Do you have an article dealing with this topic?<BR><BR>btw. How do I split an html table row horizontally or vertically programatically.<BR><BR>Many thanks,<BR>Dion.

  2. #2
    Join Date
    Dec 1969

    Default RE: Iterate User control's controls

    What don&#039;t you create a public property of type DataList in the user control that references the actual data list in the control.<BR><BR>Or create a public method in the control that populates the data list. The caller can pass the necessary parameters to the operation and the opertion can bind the DataList with those parameters.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts