您的位置:首页 > 编程语言 > ASP

在VS.net 2005(ASP.NET 2.0) 中为GridView加行序的方法

2007-03-12 18:20 441 查看
在VS.net 2005(ASP.NET 2.0) 中为GridView加行序的方法:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowIndex >= 0)
{ ((Label)e.Row.Cells[2].FindControl("Label2")).Text = Convert.ToString

(e.Row.DataItemIndex + 1);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: