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 659931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:06:01+00:00 2026-05-13T23:06:01+00:00

here is the problem I am having with placeholder: I have a repeater and

  • 0

here is the problem I am having with placeholder:

I have a repeater and within that repeater, I have an item template. Now this template is formatted with a couple of tables, but for this question I have removed them to make things easier to read:

<asp:Repeater ID="Repeater1" OnItemDataBound="R1_ItemDataBound" runat="server">

   <ItemTemplate>
      <asp:PlaceHolder ID="phAnswers" runat="server"></asp:PlaceHolder>               
   </ItemTemplate>
</asp:Repeater>

Then, on the event OnItemDataBound, I create a new placeholder, bind it to the existing on (phAnswers), however the placeholder is not updated with the radiobuttons/textboxs that are created:

    Dim rdList As New RadioButtonList
    Dim newRadio As New RadioButton

 If (e.Item.ItemType = ListItemType.Item) Or _
        (e.Item.ItemType = ListItemType.AlternatingItem) Then

        Dim tempPH As PlaceHolder

        tempPH = e.Item.FindControl("phAnswers")

        For x As Integer = 0 To (t_MC.Count - 1)

                newRadio = New RadioButton

                newRadio.ID = "Answer" + x.ToString
                newRadio.Text = t_MC(x).Value
                rdList.Controls.Add(newRadio)

            Next

   tempPH.Controls.Add(rdList)

Any ideas why phAnswers is not updated with the new tempPH placeholder?
Cheers

  • 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-13T23:06:01+00:00Added an answer on May 13, 2026 at 11:06 pm

    OnItemDataBound may be too late to add controls. Try it in OnItemCreated and see if that helps. It’s a quick test – just change your repeater event declaration like this:

    OnItemCreated="R1_ItemDataBound"
    

    If this idea doesn’t help, you can easily switch it back.

    Edit – I just noticed something. To populate a RadioButtonList, you should use ListItems, like this:

    ListItem item - new ListItem("your text", "your value");
    rdList.Items.Add(item);
    

    This is probably why your RadioButtonList did not appear, but lone radio buttons worked.

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

Sidebar

Related Questions

I'm having a problem here.. Supposed I have this kind of datetime. $date =
Here is the problem im having. I have 5 buttons on my form that
I'm having a strange problem here... I have an ASP.NET 3.5 application that has
Ok, here's a problem I'm having. I have Lua bindings to a rendering engine
HI Guys, Here I am having problem that How can I post an image
Here is a (big) example of the massive problem I am having, when this
i am facing this problem here. i want to show item's name by getting
I am having problem here with bitmaps..I want to remove the black background that
Hello I'm having a problem here. The code looks like this. private void Form3_Load(object
having a problem here so hopefully could use some help. I have a text

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.