protected void show_lib()

  {

  string cid = Request.QueryString["cid"];

  string strconn = ConfigurationSettings.AppSettings["strconn"];

  SqlConnection conn = new SqlConnection(strconn);

  string strsql = "select * from View_lib_report where Cid='" + cid + "' and Sid='" + Session["stuID"] + "'";

  SqlCommand cmd = new SqlCommand(strsql, conn);

  try

  {

  conn.Open();

  SqlDataReader sda = cmd.ExecuteReader();

  while (sda.Read())

  {

  this.lbname.Text = sda.GetValue(1).ToString();

  this.lbmajor.Text = sda.GetValue(3).ToString();

  this.lbgrade.Text = sda.GetValue(2).ToString();

  this.lbClass.Text = sda.GetValue(4).ToString();

  this.ddlTitle.Items.Add(sda.GetValue(6).ToString());

  this.ddlTeacher.Items.Add(sda.GetValue(7).ToString());

  this.TextArea1.Value = sda.GetValue(8).ToString();

  this.Textarea2.Value = sda.GetValue(9).ToString();

  }

  }

  catch

  {

  return;

  }

  finally

  {

  cmd.Dispose();

  conn.Close();

  }

  }