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;
using System.Data.SqlClient;public partial class StudentInfo : System.Web.UI.Page
{
    public string ClassName;
    protected void Page_Load(object sender, EventArgs e)
    {    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        string name;
        string password;
        string No;
        string ClassName;
        int Num = int.Parse(Session["Num"].ToString());
        for (int j = 1; j <= Num; j++)
        {
            name = Request["name" + j].ToString();
            password = Request["pwd" + j].ToString();
            No = Request["No" + j].ToString();
            ClassName = Request["classname" + j].ToString();
            string sql = "insert into student(studentname,studentpassword,studentclass,studentorder)";
            sql += "values('"+name+"','"+password+"','"+ClassName+"','"+No+"')";
            DataConn d1 = new DataConn();
            d1.conn.Open();
            SqlCommand cmd = new SqlCommand(sql, d1.conn);
            cmd.ExecuteNonQuery();
            d1.conn.Close();
        }
        this.Panel2.Visible = true;
        this.TextBox1.Text = "";
        this.TextBox2.Text = "";
        this.TextBox3.Text = "";
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        this.ClassName = this.TextBox1.Text;
        this.StuNum = int.Parse(this.TextBox3.Text);
        Session["Num"] = StuNum;
        No = new string[StuNum];
        for (int i = 1; i <= StuNum; i++)
        {
            if (i < 10)
                No[i - 1] = ClassName + "0" + i;
            else
                No[i - 1] = ClassName + i;
        }
        Panel2.Visible = false;
        Panel1.Visible = true;
    }
    protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (RadioButtonList1.SelectedValue == "0")
        {
            Panel2.Visible = true;
            Panel3.Visible = false;
        }
        else
        {
            Panel3.Visible = true;
            Panel2.Visible = false;
            Panel1.Visible = false;
        }
    }
}错误:"ASP.studentinfo_aspx"并不包含“panel2_load”的定义
      “studentinfo”并不包含“StuNum”的定义
      当前上下文中不存在名称“No”
      当前上下文中不存在名称“StuNum”