User Control - takes HTML as parapeter

  • Thread starter 00_CuMPe3WaR3D12
  • 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>
 
J

Jason MacKenzie

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.
 
0

00_CuMPe3WaR3D12

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>
 
0

00_CuMPe3WaR3D12

I think i found a solution by setting ParseChildren to false

[ParseChildren(false)]

thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top