protected void Page_Load(object sender, EventArgs e) { if (Session["studentId"] != null) { Button1.Visible = false; } if (!IsPostBack) { Label1.Text = Request.QueryString["times"]; Label2.Text = Request.QueryString["name"]; HyperLink1.NavigateUrl = Request.QueryString["content"]; txt2.Text = Request.QueryString["remarks"]; Label3.Text = Request.QueryString["publishTime"]; Label4.Text = Request.QueryString["closeTime"]; Label6.Text = Request.QueryString["classId"]; ClassesManage cm = new ClassesManage(); DataTable dt = cm.SelectClassByClassId(Convert.ToInt32(Request.QueryString["classId"])); Label7.Text = dt.Rows[0]["classname"].ToString(); Label8.Text = dt.Rows[0]["term"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["teacherId"] != null) { if (!IsPostBack) { Label2.Text = Request.QueryString["times"]; Label4.Text = Request.QueryString["name"]; Label6.Text = Request.QueryString["classId"]; ClassesManage cm = new ClassesManage(); DataTable dt = cm.SelectClassByClassId(Convert.ToInt32(Request.QueryString["classId"])); Label7.Text = dt.Rows[0]["classname"].ToString(); Label8.Text = dt.Rows[0]["term"].ToString(); gridviewBind(); reviews.Visible = false; } } else { Response.Redirect("../login.aspx"); } }