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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:23:55+00:00 2026-06-08T23:23:55+00:00

I’m having trouble with a certain scenario. I have a repeater control, within I

  • 0

I’m having trouble with a certain scenario. I have a repeater control, within I have a placeholder (and for the sake of testing, I’ve placed a div and tried that as well). I would like to, in my code behind page, find that placeholder or div, and put controls in it (for now, 3 textboxes and 2 buttons)

I have no issue with adding controls to a placeholder, I understand how that works, what I can’t get here, is how to find this dynamic control here.

Here is some code snippets to help illustrate what I’m trying to do.

(the asp)

        <asp:Repeater id="rptSpecialNotes" runat="server">
        <ItemTemplate>
            <asp:UpdatePanel ID="udpSpecialNotesRepeater" runat="server">
                <ContentTemplate>
                    <asp:PlaceHolder ID="plhSpecialNotesRepeater" runat="server">
                    </asp:PlaceHolder>
                </ContentTemplate>
            </asp:UpdatePanel>
            <p><%# eval("subject") %></p>
            <div id="specialNotes" runat="server"></div>
            <asp:imagebutton runat="server" AlternateText="add Motion" ImageUrl="images/controls/Exclaim.png" width="40" height="40"></asp:imagebutton>
            <asp:imagebutton runat="server" AlternateText="add document" ImageUrl="images/controls/Documents.png" width="40" height="40"></asp:imagebutton>
            <asp:imagebutton runat="server" AlternateText="move up" ImageUrl="images/controls/Arrow-Up.png" width="40" height="40" CommandName="moveUp" CommandArgument='<%# Container.ItemIndex & "," &  eval("ItemID") %>'></asp:imagebutton>
            <asp:imagebutton runat="server" AlternateText="move down" ImageUrl="images/controls/Arrow-Down.png" width="40" height="40" CommandName="moveDown" CommandArgument='<%# Container.ItemIndex & "," &  eval("ItemID") %>'></asp:imagebutton>
            <asp:imagebutton runat="server" AlternateText="delete" ImageUrl="images/controls/Delete.png" width="40" height="40" CommandName="delete" CommandArgument='<%# Container.ItemIndex & "," &  eval("ItemID") %>'></asp:imagebutton>
            <asp:imagebutton runat="server" AlternateText="edit" ImageUrl="images/controls/Globe.png" width="40" height="40" CommandName="edit" CommandArgument='<%# Container.ItemIndex & "," &  eval("ItemID") %>'></asp:imagebutton>
        </ItemTemplate>
    </asp:Repeater>

The image button edit, hits the rptSpecialNotes_Item command, which calls a method (edit special notes) which looks something like this

    Dim commandArguments() As String = Split(e.CommandArgument, ",")
    Dim divId As String = commandArguments(0)
    Dim itemId As String = commandArguments(1)



    'determine action based on command name
    If e.CommandName = "edit" Then
        Call editSpecialNotes(itemId,divId)
    End If

and edit special notes is to place things in the given divID. For the sake of getting this to work, I’ve given divID a static value that I know exists (rptSpecialNotes_plhSpecialNotesRepeater_1) or something similar to that extent. However, I always end up with a null object reference.

  • 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-06-08T23:23:57+00:00Added an answer on June 8, 2026 at 11:23 pm

    Use FindControl to get the nested control in the rptSpecialNotes_Item event handler – this will return the control:

    sender.FindControl("specialNotes")
    

    It will return a Control type, so a cast is needed to the right type if you want to use the specific properties and methods of that type.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.