test.master.cs

来自「计算机考试管理系统 包括模拟测试」· CS 代码 · 共 30 行

CS
30
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Test : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int m_questions = ((DataTable)Session["Questions"]).Rows.Count;
        if (m_questions > 0)
        {
            for (int i = 1; i <= m_questions; i++)
            {
                TableCell cell1 = new TableCell();
                cell1.Text = string.Format("<a href=test.aspx?no={0}>第{0}题</a>", i);
                TableRow row1 = new TableRow();
                row1.Cells.Add(cell1);
                Table1.Rows.Add(row1);
            }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?