protected void Page_Load(object sender, EventArgs e) { int id; if (!IsPostBack) { if (Request.QueryString["cardid"] != null) { id = Convert.ToInt32(Request.QueryString["cardid"].ToString()); SqlDataReader dt = CardBll.idcard(id); dt.Read(); if (dt != null) { name.Text = dt[1].ToString().Trim(); cost.Text = dt[2].ToString().Trim(); rd.Text = dt[3].ToString().Trim(); hp.Text = dt[4].ToString().Trim(); ap.Text = dt[5].ToString().Trim(); effect.Text = dt[6].ToString().Trim(); ch.Text = dt[7].ToString().Trim(); race.Text = dt[8].ToString().Trim(); occupation.Text = dt[9].ToString().Trim(); off.Text = dt[10].ToString().Trim(); img.ImageUrl = dt[11].ToString().Trim(); } } } }