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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:37:45+00:00 2026-05-14T00:37:45+00:00

<%@ Register Src=~/Controls/PressFileDownload.ascx TagName=pfd TagPrefix=uc1 %> <asp:Repeater id=Repeater1 runat=Server OnItemDataBound=RPTLayer_OnItemDataBound> <ItemTemplate> <asp:Label ID=LBLHeader Runat=server

  • 0
<%@ Register Src="~/Controls/PressFileDownload.ascx" TagName="pfd" TagPrefix="uc1" %>

<asp:Repeater id="Repeater1" runat="Server" OnItemDataBound="RPTLayer_OnItemDataBound">
 <ItemTemplate>
   <asp:Label ID="LBLHeader" Runat="server" Visible="false"></asp:Label>
   <asp:Image ID="IMGThumb" Runat="server" Visible="false"></asp:Image>
   <asp:Label ID="LBLBody" Runat="server" class="layerBody"></asp:Label>
   <uc1:pfd ID="pfd1" runat="server" ShowContainerName="false" ParentContentTypeId="55" />
   <asp:Literal ID="litLayerLinks" runat="server"></asp:Literal>
 </ItemTemplate>
</asp:Repeater>

System.Web.UI.WebControls.Label lbl;
System.Web.UI.WebControls.Literal lit;
System.Web.UI.WebControls.Image img;
System.Web.UI.WebControls.HyperLink hl;
System.Web.UI.UserControl uc;

I need to set the ParentItemID variable for the uc1:pdf listed inside the repeater.
I thought I should be able to find uc by looking in the e.Item and then setting it somehow. I think this is the part where I’m missing something.

uc = (UserControl)e.Item.FindControl("pfd1");
if (uc != null) { uc.Attributes["ParentItemID"] = i.ItemID.ToString(); }

Any thoughts would be appreciated.

Also tried this with similar results… when I debug inside my usercontrol (pfd1) the parameters I am trying to set have not been set.

uc = (UserControl)e.Item.FindControl("pfd1");
if (uc != null) 
{
  uc.Attributes.Add("ContainerID", _cid.ToString());
  uc.Attributes.Add("ParentItemId", i.ItemID.ToString());
}

UPDATE: It looks like my controls are not connected by a namespace. I’ve wrapped by the parent control (Layer) and the PressFileDownlad control in a namespace “MyControls”. Also updated their Inherits reference on the aspx to read “MyControls.xxxxx”. I’m able to type “MyControls.Layer” inside the code on layer.aspx.cs but I’m not able to get “MyControls.PressFileDownload”

  • 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-14T00:37:45+00:00Added an answer on May 14, 2026 at 12:37 am

    If you implement ParentItemID as a public property in your user control, then you should be able to set it declaratively, e.g:

    <asp:Repeater id="Repeater1" ...>
     <ItemTemplate>
       <uc1:pfd ID="pfd1" runat="server" ParentItemId='<%# Eval("ItemID") %>' ... />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of files in the directory C:\Users\Mahady\Desktop\Java 31122011\src\register\ they are like
I have a UserControl which uses a UserControl, among other controls. In the ascx
I register a UPnP device with: var o: IUPnPRegistrar; W: string; R: HRESULT; begin
Code @register.inclusion_tag('template.html', takes_context=True) def include_client_side_bar(context): return { 'STATIC_URL': settings.STATIC_URL, } My code is will
int* Register = 0x00FF0000; // Address of micro-seconds timer while(*Register != 0); Should I
I register the following function //EDIT: updated $("#id").on("change", function() { alert('xxx'); }); In my
containerBuilder .Register<IGraphClient>(context => { var graphClient = new GraphClient(new Uri(http://localhost:9999/db/data)); graphClient.Connect(); // Particularly this
I register a NSNotification in viewDidLoad method. Should I unregister it both in viewDidUnload
i am developing register form using php where i need to upload the file
I made register form where you have to put in all your personal info.

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.