前台代码:/asp:HyperLinkField
detailed.aspx页面的后台代码:
string userid = Request.QueryString["USERID"];
SqlConnection cn = new SqlConnection("data source=localhost;initial catalog=opinion;Integrated Security=true");
SqlCommand cmd = new SqlCommand("Select * From opinion where USERID='" + userid + "'", cn);
cn.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
this.TextBox1.Text = dr["TITLE"].ToString();
this.TextBox2.Text = dr["TIME"].ToString();
this.TextBox3.Text = dr["BODY"].ToString();
this.TextBox4.Text = dr["pandaWebUrl"].ToString();
this.TextBox5.Text = dr["AUTHOR"].ToString();
this.TextBox6.Text = dr["SOURCE"].ToString();
this.TextBox7.Text = dr["DESCRIBE"].ToString();
this.TextBox8.Text = dr["KEYWORDS"].ToString();
}
dr.Close();
cn.Close();
TextBox现实的内容是空白;好像 Request.QueryString["USERID"]取到的值是空白,这是怎么回事啊?