Is there anyway to replace a Web Control with an HTML template string?

25 Views Asked by At

I'm trying to use template strings to render reusable components in a asp.net web forms app. I can get it to work the way I want to, the only problem is that I can't seem to get rid of the ContentPlaceHolder parent.

I tried using WebControl.InnerHtml = "<h1>my custom template</h1>", but this obviously only adds children to the node and it doesn't get rid of it. Something like WebControl.OuterHtml would fix my problem completely but that doesn't seem to exist. Is this possible to do at all?

0

There are 0 best solutions below