Hallo!
Ich habe hier den folgenden ASP Code für eine HTML Tabelle zusammengestellt:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33:
| void generateHTMLTable(int intAnzahlSpalten, int intAnzahlZeilen) { try { HtmlTable table = new HtmlTable();
table.Border = 2; table.BorderColor = "black";
for (int i = 0; i < intAnzahlSpalten; i++) { HtmlTableRow tableRow = new HtmlTableRow(); table.Rows.Add(tableRow);
for (int y = 0; i < intAnzahlZeilen; y++) { HtmlTableCell tableCell = new HtmlTableCell(); tableCell.Text = "Test"; tableRow.Cells.Add(tableCell); } }
Page.Controls.Add(table);
}
catch (Exception e) { Label1_Exception.Text = (string)e.Message; Label2_Exception_2.Text = (string)e.Source; Label3_Exception_3.Text = (string)e.StackTrace; } } |
Mir wird immer wieder eine OutOfMemory Exception ausgegegen. Da ich noch recht neu in ASP.Net bin, verstehe ich nicht so ganz, woran das liegt.
Grüße
Dennis