veerendra kumar

veerendra kumar

  • NA
  • 47
  • 20.6k

dynamic div creation.

Mar 5 2015 12:39 AM
my code:
.aspx:

 <div id="taskdata" runat="server">  </div>

.Cs file


var Comments = DataBase.retive(txtTID.Text);
StringBuilder builder = new StringBuilder();
 builder.Append("<div> <table><tr><td>Comments</td><td>createdate</td></tr><tr><td>createad by</td></tr></table></div>");
  foreach (var I in Comments)
  {
  string comments = I.Comment;
  string createdby = I.Createdby;
  DateTime createdata = I.Createdate;
  String fname = I.datafile;


  builder.Append("<div><table><tr><td>" + comments + "</td><td>" + createdata + "</td></tr><tr><td>" + createdby + "</td></tr><tr><td>" + fname+ "</td></table></br></div>");

  }
  taskdata.InnerHtml = builder.ToString();


i will get OutPut. i am create only table. but My output is d't reach my Expectations. my view is create seperate div with styles. under taskdata.





Answers (7)