asp:placeholder - insert html after

  • Thread starter Thread starter Brett Robichaud
  • Start date Start date
B

Brett Robichaud

I'm trying to create a Page class that I derive all others from. This page
class will look for an asp:placeholder and insert some html at that point.

I can see how I can create new HTML controls in code and then add them to
the placeholders Controls container. But is there any way I can use
Response.Write() to output some html directly before of after this
placeholder? What I was after is something like a InnerHtml method, but I
see nothing like this.

Any ideas?
 
Brett,

You could do PlaceHolder1.Controls.Add(new LiteralControl("<div>" +
strWhatever + "</div>"));



Or



PlaceHolder1.Controls.AddAt(2,new LiteralControl("<div>" + strWhatever +
"</div>"));



Hope this helps...

Brian K. Williams
 
Back
Top