protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { int banjiid = int.Parse(Request.QueryString["banjiid"]); int zuoyeid = int.Parse(Request.QueryString["zuoyeid"]); if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[0].Text = (e.Row.RowIndex + 1).ToString(); string questionid = GridView1.DataKeys[e.Row.RowIndex].Value.ToString(); e.Row.Cells[5].Text = string.Format("{0:P}", ZuoyeInfo.ZuoyeTimuDefenLv(banjiid, zuoyeid, int.Parse(questionid))); e.Row.Cells[6].Text = TimuInfo.TimuZhishidian(int.Parse(questionid)); } }