Posted By

hobeau on 04/24/09


Tagged

DOM


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

umang_nine
fredblogs


Append HTML to a div


 / Published in: C#
 

URL: http://www.devcurry.com/2009/01/dynamically-create-tag-using-server.html

Append html to a div tag (using System.Web.UI.HtmlControls)

  1. HtmlGenericControl p = new HtmlGenericControl("p");
  2. div.Controls.Add(p);
  3.  
  4.  
  5. /****************************
  6. <html>
  7. <head>
  8. </head>
  9. <body>
  10. <div id="elem" runat="server">
  11.  
  12. </div>
  13. </body>
  14. </html>
  15. ****************************/

Report this snippet  

You need to login to post a comment.