<script type="text/javascript"></script> 根据gridview的HyperLink不同的值跳转不同的页面 //在gridview中添加一个HyperLink模板列,根本数据列表的某一个值不同,跳转不同的页面! protected void gv_WenD_RowDataBound(object sender, GridViewRowEventArgs e) { HyperLink hl1 = ((HyperLink)e.Row.FindControl("btn_souy")); //获取sysid值 string vendorID = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "sysid")); //根据条件跳转不同的页面 if (e.Row.RowType == DataControlRowType.DataRow) { //根本数据集中第三列的值来判断跳转的页面 if (e.Row.Cells[2].Text == "未解决") { hl1.NavigateUrl = "../WenD/DaiJJWT.aspx?wentid=" + vendorID; } }