private void GetGroupListHtml()
{
//...Code omitted
String htmlCode = String.Empty;
foreach (DataRow _DataRow in _DataTable.Rows)
{
htmlCode += @"<div class=""box collapsed-box"">
<div class=""box-header with-border"">
<h3 class=""box-title"">
<asp:Label ID=""groupTitleLabel"" runat=""server"" Text=" +_DataRow["groupName"] + @"""></asp:Label>
</h3>
<div class=""box-tools pull-right"">
<button class=""btn btn-box-tool"" data-widget=""collapse"" data-toggle=""tooltip"" title=""Expand""><i class=""fa fa-plus""></i></button>
</div>
</div>
</div>";
}
}
I want to add the htmlCodes to a div. Is it possible to do it this way? Basically i have a string variable which appends the html codes. I want to dump this code in between the div tag and return the new webpage to the user.
<div id="groupListDiv" runat="server"></div>