User Control - takes HTML as parapeter

  • Thread starter Thread starter 00_CuMPe3WaR3D12
  • Start date Start date
0

00_CuMPe3WaR3D12

How do I write a user control that takes HTML and then renders it? Is it
possible? I want to do something like this..

<Name:Box id="mybox" runat="server">

<table>
.... any html can inserted in here....
</table>

</Name:Box>
 
Why not just expose a string property that takes the html you want?

Throw a literal control in between your table tags and set it with the value
of your property.
 
Actually to be exact, I need more than PLAIN Html I want to have a form
(or other controls) to be put between my Control. In other words, it is a
question of "How do I put a control under a User/Web Control. Sorry I wasn't
being clear enough....

<Name:Box id="mybox" runat="server">
<form id="myform" runat="server">
.....
</form>
</Name:Box>
 
I think i found a solution by setting ParseChildren to false

[ParseChildren(false)]

thanks.
 
Back
Top