codice:
<%@ Page Language="VB" %>
<%@ Import Namespace="l=libreria.ModuloWeb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim v As Double(,) = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}}
Dim sb As New StringBuilder()
sb.Append("<table>")
For i As Integer = 1 To 4
sb.Append("<tr>")
For j As Integer = 1 To 4
sb.Append("<td>")
If i = j Then
sb.Append(v(i - 1, j - 1).ToString())
Else
sb.Append("")
End If
sb.Append("</td>")
Next
sb.Append("</tr>")
Next
sb.Append("</table>")
Me.Literal1.Text = sb.ToString()
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</div>
</form>
</body>
</html>