62,046
社区成员
发帖
与我相关
我的任务
分享
string con = ConfigurationManager.ConnectionStrings["1ConnectionString"].ConnectionString;
SqlConnection conn = new SqlConnection(con);
conn.Open();
SqlCommand ceshijiID = new SqlCommand("SELECT * FROM tables ", conn);
SqlDataReader bianhao = ceshijiID.ExecuteReader();
while (bianhao.Read())
{
Session["ceshiji_ID"] = bianhao[0];
Label1.Text = Label1.Text + "<br>" + "<a href =main.aspx>" + bianhao[0] + "<a/>";
}