billpg
billpg

Reputation: 3293

ASP.NET - Remove arbitary sections of HTML at run-time?

I'm looking for an ASP element that could do this with an ASPX file...

<table>
  <tr><td>...</td></tr>
  <asp:Thing runat=server ID=myThing>
    <tr><td>...</td></tr>
  </asp:Thing>
</table>

And then from the C# Page_Load function, I could do something with the "myThing" object that will remove that block from the HTML sent to the browser. But what’s the <asp:Thing> ?

To pre-empt the answer "Use an ASP table and remove the applicable item from the Rows collection.", I'm looking for an answer that would work with any arbitrary run of HTML tags. The table is just an illustrative example.

Any ideas please? Many thanks.

Upvotes: 1

Views: 136

Answers (1)

Tim B James
Tim B James

Reputation: 20364

Give <asp:PlaceHolder> a shot. That does not render any html like what a <asp:Panel> does.

Upvotes: 2

Related Questions