日期:2014-05-18 浏览次数:20913 次
<asp:Label ID="lb_show" runat="server" style="position:absolute; top: 196px; left: 88px; height: 16px; word-break:break-all"/></asp:Label>
protected void btn_submit_Click(object sender, EventArgs e) { string message = string.Empty; try { int min = Convert.ToInt32(txt_start.Text); int max = Convert.ToInt32(txt_end.Text); for (int i = min; i <= max; i++) { for (int j = min; j <= i; j++) { message += string.Format("{0}*{1}={2} ", j, i, i * j); } message += "\r\n"; } } catch { message = "请输入正确数字"; } lb_show.Text = message; }