日期:2014-05-16 浏览次数:21085 次
<div>
<a id="SelectAll" runat="server" onserverclick="SelectAll_Click">显示列表</a>
</div>
<div id="Score" runat="server" style="text-align:center">
</div>
DataSet set = new DataSet();
set= dbo.ReturnSelectSet("Select * from UserInfo");
string strHtml = "<table><tr>";
for (int n = 0; n < set.Tables[0].Columns.Count; n++)
{
strHtml += "<td>" + set.Tables[0].Columns[n] + "</td>";
}
strHtml+="</tr>";
for (int i = 0; i < set.Tables[0].Rows.Count; i++)
{
strHtml += "<tr>";
for (int j = 0; j < set.Tables[0].Columns.Count; j++)
{
strHtml += "<td>" + set.Tables[0].Rows[i][j] + "</td>";
}
strHtml += "<td><input id='" + set.Tables[0].Rows[i][0] + "' type='button' runat='server' onserverclick='Btn_Click' value='删除' /></td>";
strHtml += "</tr>";
}
strHtml += "</table>";
this.Score.InnerHtml = strHtml;