Exemplo n.º 1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        int    row  = Table1.Rows.Count;
        string name = "";
        bool   flag = false;

        for (int i = 1; i < row; i++)
        {
            RadioButton check = new RadioButton();
            check = (RadioButton)Table1.Rows[i].Cells[4].Controls[0];
            if (check.Checked)
            {
                name = Table1.Rows[i].Cells[1].Text;
                flag = true;
                continue;
            }
        }
        if (!flag)
        {
            Label2.Visible = true;
            return;
        }
        Employee_pros pros   = new Employee_pros();
        int           testId = pros.getTestId(name, Session["user"].ToString().TrimEnd());

        Session["tid"] = testId.ToString();
        Response.Redirect("EditTest.aspx");
    }