Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7561853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:15:59+00:00 2026-05-30T13:15:59+00:00

I have a User Control which returns a table of data, which in some

  • 0

I have a User Control which returns a table of data, which in some cases needs to be looped, displaying one on top of another.

I am able to dynamically add a single instance of this by placing a fixed placeholder in the page.

I am now trying to work out how to add more than one, given that I don’t know how many might be needed I don’t want to hard code the Placeholders.

I’ve tried the following, but I am just getting one instance, presumably the first is being overwritten by the second

My HTML

<div id="showHere" runt="server"/>

VB

Dim thisPh As New PlaceHolder
thisPh.Controls.Add(showTable)
showHere.Controls.Add(thisPh)

Dim anotherPh As New PlaceHolder
anotherPh .Controls.Add(showTable)
showHere.Controls.Add(anotherPh)

How do I make it add repeated tables within the showHere div?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:16:00+00:00Added an answer on May 30, 2026 at 1:16 pm

    I would advise generating a different ID for each of your table. For example,

    Dim i As Integer
    i = 0
    For each tbl in ShowTables
        tbl.ID = "MyTab" + i.ToString()
        i = i + 1
        showHere.Controls.Add(tbl)
        showHere.Controls.Add(New LiteralControl("<br />"))
    Next
    

    On other hand, it would make more sense to have a your user/custom control generate html for a single table and then nest your user/custom control within a repeater (or similar control such as ListView etc).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user control which does some validation in the ValidateChildren method which
I have a user control which uses objects as inner properties (some code is
I have a usercontrol called MyUserControl.xaml which dynamically adds another user control: UserControl myControl
I have a user control which takes a Func which it then gives to
I have a user control which has a textbox on it, now this usercontrol
I have a user control which displays the currently logged in user's name. I
I have user control named DateTimeUC which has two textboxes on its markup: <asp:TextBox
I have developed a user-control which gets bound to an id-field and then enables
I have a wpf user control which exposes an IEnumerable ItemsSource DependencyProperty. I bind
I have a nested user control which appears on every single page. It contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.