62,266
社区成员
发帖
与我相关
我的任务
分享protected string showInfo(int id)
{
string sql = "select top 5 * from context where listid=" + id + "";
string tbody = "";
OleDbDataReader my_reader;
OleDbCommand my_comm = new OleDbCommand();
my_comm.CommandText= sql;
my_comm.CommandType = CommandType.Text;
my_comm.Connection = my_conn;
my_conn.Open();
my_reader = my_comm.ExecuteReader();
while (my_reader.Read())
{
tbody += "<TD style=OVERFLOW: hidden; TEXT-OVERFLOW: ellipsis noWrap align=left width=100% height=26>";
tbody += "<a href=show.aspx?id=" + my_reader["id"].ToString() + ">" + my_reader["title"].ToString() + " </a></TD></TR>";
}
my_reader.Close();
my_conn.Close();
return tbody;
}