c# - html from code behind -
i want insert html few controls +style code behind ( asp.net c#) how can ?
you use <asp:placeholder>
add controls this.
e.g.
image img = new image(); img.imageurl = "/someurl.jpg"; img.cssclass = "someclass"; img.id = "someid"; img.alternatetext = "alttext" plageholderid.controls.add(img);
this produce html
<img src="/someurl.jpg" class="someclass" id="someid" alt="alttext" />
you can control, literal, hyperlink, button, table, etc...
Comments
Post a Comment