I've got a problem with ASP.NET. I'm using C#.
With a SQL query i have the number exactly of rows in a Database, i need to write the same number of div tag to show the results.
This is the code
count is a variable that contain the number of rows.
Projects is a List
for (int i = 0; i < count; i++)
{
form1.Controls.Add(new Literal() {
ID = "ltr" + i,
Text = "<div class= 'container' >Name = " + Projects[i].Name + " ;</div>" });
}
But there is a problem, i must place these div into another div with ID = Container.
in this way Literal controls aren't placed into div#Container
How can i do to place the For results into a div?