hyperlink的问题
我在界面上加了一个hyperlink,让它显示文档的名称,然后文档的存储位置。
string select="select distinct wdname,location from xxwd where subject='"+subject.Text +"'";
SqlCommand mycmd=new SqlCommand(select,myConnection);
mycmd.Connection.Open();
SqlDataReader dlds=mycmd.ExecuteReader();
while(dlds.Read())
{
wdname.Text =dlds["wdname"].ToString();
wdname.NavigateUrl =dlds["location"].ToString();
}
dlds.Close();
mycmd.Connection.Close();
如果查找一条记录是正常的使用的,可是如果是多条记录,那么它只显示最后一条,我想把它全显示出来应该怎么做