拿fill填充以后
循环输出每个table里的字段内容
如何加超连接?
SqlCommand com = new SqlCommand("select word from Words", con);
SqlDataAdapter da = new SqlDataAdapter(com);
DataTable table = new DataTable();
da.Fill(table);
for (int i = 0; i < table.Rows.Count; i++)
{
Response.Write(table.Rows[i][0].ToString()+"<br>"+"<br>");
}
应该怎么加?
循环输出每个table里的字段内容
如何加超连接?
SqlCommand com = new SqlCommand("select word from Words", con);
SqlDataAdapter da = new SqlDataAdapter(com);
DataTable table = new DataTable();
da.Fill(table);
for (int i = 0; i < table.Rows.Count; i++)
{
Response.Write(table.Rows[i][0].ToString()+"<br>"+"<br>");
}
应该怎么加?
Response.Write("<a href='http://#'>"+table.Rows[i][0].ToString()+"</a><br><br>");
{
Response.Write("<a href='www.baidu.com'>"+table.Rows[i][0].ToString()+"</a> <br>"+" <br>");
}