What’s the best way for print html?
I can do this:
container.InnerHtml = "<input type=\"text\" ...runat=..>";
where container is an ref to an <div> HTML
but I have impression that this it’s not the correct mode.
can someone point me for right direction?
Thanks in advance.
As Paolo has mentioned, using the
<asp:PlaceHolder>is a good way to inject HTML at runtime. Not only does it allow for you to output plain html<div><p>Hello World!</p></div>but it also allows you to dynamically add other asp.net controls.For your example above you could do
.aspx
c#
This then allows you to access the value which you enter into textBox1 dynamically.