protected void binddingzhi()
{
string sqlcomm = "";
sqlcomm += "SELECT UF_CARD_TITLE,UF_CARD_USERID,UF_CARD_ADDTIME,UF_RECARD_SORT,";
sqlcomm += "UF_CARD_VISITQUANTITY,UF_RECARD_ADDTIME,UF_RECARD_USERID FROM UF_CARD,UF_RECARD WHERE UF_RECARD_SORT IN";
sqlcomm += " (SELECT count(*) FROM UF_RECARD WHERE UF_RECARD_CARDID IN (SELECT UF_CARD_ID FROM UF_CARD))";
sqlcomm += " AND UF_CARD_TOP = 1 ORDER BY UF_CARD_ADDTIME desc";
SqlConnection myconn = new SqlConnection(publicclass.getconnstr());
myconn.Open();
SqlCommand mycommand = new SqlCommand(sqlcomm, myconn);
SqlDataReader sdr = mycommand.ExecuteReader();
for (int i = 0; i < 10; i++)
{
if (sdr.Read())
{
Response.Write(sdr["UF_CARD_TITLE"]);
Response.Write("<br>");
Response.Write(sdr["UF_CARD_USERID"]);
Response.Write("<br>");
Response.Write(sdr["UF_CARD_ADDTIME"]);
Response.Write("<br>");
Response.Write(sdr["UF_RECARD_SORT"]);
Response.Write("<br>");
Response.Write(sdr["UF_CARD_VISITQUANTITY"]);
Response.Write("<br>");
Response.Write(sdr["UF_RECARD_USERID"]);
Response.Write("<br>");
Response.Write(sdr["UF_RECARD_ADDTIME"]);
Response.Write("<br>");
//((LinkButton)(GridView1.Rows[0].Cells[1].FindControl("LinkButton1"))).Text = sdr["UF_CARD_TITLE"].ToString();
//((Label)(GridView1.Rows[0].Cells[2].FindControl("Label2"))).Text = sdr["UF_CARD_USERID"].ToString();
//((Label)(GridView1.Rows[0].Cells[2].FindControl("Label3"))).Text = sdr["UF_CARD_ADDTIME"].ToString();
//((Label)(GridView1.Rows[0].Cells[3].FindControl("Label4"))).Text = sdr["UF_RECARD_SORT"].ToString();
//((Label)(GridView1.Rows[0].Cells[3].FindControl("Label5"))).Text = sdr["UF_CARD_VISITQUANTITY"].ToString();
//((Label)(GridView1.Rows[0].Cells[4].FindControl("Label6"))).Text = sdr["UF_RECARD_USERID"].ToString();
//((Label)(GridView1.Rows[0].Cells[4].FindControl("Label7"))).Text = sdr["UF_RECARD_ADDTIME"].ToString();
}
else
{
Response.Write("no");
}
}
}