Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Placeholder not replaced

Placeholder not replaced

Scheduled Pinned Locked Moved ASP.NET
designsysadmindocker
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stephan Pilz
    wrote on last edited by
    #1

    Hello, I use a placeholder in a normal table, to generate some columns dynamic. The table is a child of a repeater. A placeholder is in the tableheader and one placeholder in tablefooter. All of this has worked till I moved the repeater to a usercontrol for reusing this element more than once in one page. Here is the code: <asp:repeater id="Rep_dn" runat="server" DataSource="<%# m_oView %>">   <HeaderTemplate>     <table cellspacing="0" cellpadding="0" border="1">       <tr align="center" bgcolor=="#ecf5ff">         <th width="50px">Karton</th>         <asp:placeholder ID="PH_sizeheaderK" Runat="server"></asp:placeholder>       </tr>   </HeaderTemplate>   <ItemTemplate>     <tr align="center" bgcolor="#fafafa">       <uc_k:PDNKUC id="PDNKUC" runat="server"         carton_refid='<%# DataBinder.Eval (Container.DataItem, "carton_refid")%>'         ph_sizeitem='<%# true%>'       ></uc_k:PDNKUC>     </tr>   </ItemTemplate>   <FooterTemplate>       <tr align="center" bgColor="#ecf5ff">         <td align="right">Sum</td>         <asp:placeholder ID="PH_sizefooterK" Runat="server"></asp:placeholder>       </tr>     </table>   </FooterTemplate> </asp:repeater> The placeholder in the insided usercontrol is filled via property ph_sizeitem. It works fine. The placeholders in header- and footertemplate is filled via function from codebehind like this: Dim oControl As System.Web.UI.Control Dim ph As PlaceHolder Rep_dn.DataBind() For Each oControl In Rep_dn.Controls()   ph = oControl.FindControl("PH_sizeheaderK")   If Not (ph Is Nothing) Then     ph.Controls.Add(New LiteralControl(m_sHtmlHeader))     Exit For   End If Next For Each oControl In Rep_dn.Controls()

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups