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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:16:06+00:00 2026-05-29T17:16:06+00:00

actually, i’m developing a web template using ASP.NET and C#. i have a listview

  • 0

actually, i’m developing a web template using ASP.NET and C#.
i have a listview in a usercontrol page and inside the ItemTemplate i have a PlaceHolder as below:

<asp:PlaceHolder ID="ph_Lv_EditModule" runat="server">  </asp:PlaceHolder>

i want to access to this PlaceHolder from code behind and i have use different method as below but i couldn’t access it.

PlaceHolder ph_Lv_EditModule = (PlaceHolder)lv_Uc_Module.FindControl("ph_Lv_EditModule");

or

PlaceHolder ph_Lv_EditModule = (PlaceHolder)this.lv_Uc_Module.FindControl("ph_Lv_EditModule");

could you please help me how to find this control at the code behind of my usercontrol page.
appreciate your consideration.

  • 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-29T17:16:14+00:00Added an answer on May 29, 2026 at 5:16 pm

    A ListView typically contains more than one item, therefore the NamingContainer(searched by FindControl) of your Placeholder is neither the UserControl, nor the ListView itself. It’s the ListViewItem object. So one place to find the reference is the ListView’s ItemDataBound event.

    protected void ListView_ItemDataBound(object sender, ListViewItemEventArgs e)
    {
        if (e.Item.ItemType == ListViewItemType.DataItem)
        {
            var ph_Lv_EditModule = (PlaceHolder)e.Item.FindControl("ph_Lv_EditModule");
        }
    }
    

    If you need the reference somewhere else, you must iterate the Items of the ListView and then use FindControl on the ListViewItem.

    By the way, this is the same behaviour as in other DataBound Controls like GridView or Repeater.

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

Sidebar

Related Questions

Actually, i have started work on creating a web service in Python and C#(.NET
Actually, I'm using this way. Do you have a better way? private bool AcceptJson(HttpRequest
Actually I want to clear that shall i do ASP.Net 2.0 first and than
Actually, this question seems to have two parts: How to implement pattern matching? How
Actually my question is all in the title. Anyway: I have a class and
Actually I have two questions. (1) Is there any reduction in processing power or
Actually, I have the task of finding the employees based on the salary rank.
Actually I have retrieved image saved on facebook but i am not getting how
Actually i want to implement swipe left and right in UIScrollview. i have scrollview
Actually i have created an singleton class. Now my singleton class extends Activity, and

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.