<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WebForm4.aspx.cs" Inherits="WebForm4" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>九九乘法表</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Table ID="Table1" runat="server">
</asp:Table>
<asp:Table ID="Table2" runat="server">
</asp:Table>
<asp:Table ID="Table3" runat="server">
</asp:Table>
<asp:Table ID="Table4" runat="server">
</asp:Table>
<asp:Table ID="Table5" runat="server">
</asp:Table>
<asp:Table ID="Table6" runat="server">
</asp:Table>
<asp:Table ID="Table7" runat="server">
</asp:Table>
<asp:Table ID="Table8" runat="server">
</asp:Table>
<asp:Table ID="Table9" runat="server">
</asp:Table>
</div>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class WebForm4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Table table = new Table();
for (int r = 0; r < 9; r++)
{
TableRow tr = new TableRow();
table.Rows.Add(tr);
for (int c = 0; c < r + 1; c++)
{
TableCell tc = new TableCell();
tr.Cells.Add(tc);
if (c <= r)
table.Rows[r].Cells[c].Text = ((r + 1)).ToString() + '×' + ((c + 1)).ToString() + '=' + (((r + 1) * (c + 1))).ToString();
}
}
form1.Controls.Add(table);
}
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有