string id = Request.QueryString["id"];
string str = "select ds from Novel where id=" + id;
SqlConnection sqlCon = new SqlConnection(lianjie.a);
sqlCon.Open();
SqlCommand com = new SqlCommand(str, sqlCon);
SqlDataReader bb = com.ExecuteReader();
bb.Read();
string a=null;
if (bb.Read())
{
a +=bb["ds"].ToString();//txtid是textbox的id}dr.close();con.close();
}
TextBox1.Text = a;
text输出不了ds的内容求解
string str = "select ds from Novel where id=" + id;
SqlConnection sqlCon = new SqlConnection(lianjie.a);
sqlCon.Open();
SqlCommand com = new SqlCommand(str, sqlCon);
SqlDataReader bb = com.ExecuteReader();
bb.Read();
string a=null;
if (bb.Read())
{
a +=bb["ds"].ToString();//txtid是textbox的id}dr.close();con.close();
}
TextBox1.Text = a;
text输出不了ds的内容求解
另外你为什么用了两次 bb.Read(); 第一次的去掉就可以吧