File: htmltable.aspx

package info (click to toggle)
xsp 3.8-2.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,352 kB
  • ctags: 2,452
  • sloc: cs: 13,500; sh: 12,512; xml: 8,279; perl: 1,189; makefile: 765; ansic: 299; php: 6
file content (29 lines) | stat: -rw-r--r-- 834 bytes parent folder | download | duplicates (7)
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
<%@ Page Language="C#" %>
<%@ Register TagPrefix="mono" TagName="MonoSamplesHeader" src="~/controls/MonoSamplesHeader.ascx" %>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/mono-xsp.css">
<title>HtmlTable, HtmlTableRow, HtmlTableCell</title>
<script runat="server">
	void Page_Load(Object sender, EventArgs e) 
	{
		for (int i = 0; i < 5; i++){
			HtmlTableRow row = new HtmlTableRow ();
			for (int j = 0; j < 4; j++){
				HtmlTableCell cell = new HtmlTableCell ();
				cell.Controls.Add (new LiteralControl ("Row " + i + ", cell " + j));
				row.Cells.Add (cell);
			}
			myTable.Rows.Add (row);
		}
	}
</script>
</head>
<body><mono:MonoSamplesHeader runat="server"/>  
<form runat="server">
<p>
<table id="myTable" CellPadding=2 CellSpacing=1 Border="2" BorderColor="blue" runat="server" /> 
</form>
</body>
</html>