protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string v1=e.Row.Cells[0].Text; //第一个字段值
string v2=e.Row.Cells[1].Text;
string v3=e.Row.Cells[2].Text;
string v4=e.Row.Cells[3].Text;
string value=v1+"$"+v2+"$"+v3+"$"+v4
e.Row.Attributes.Add("onclick", "window.location.href=跳转页面地址?value='" + value.Trim() + "'"); //value组织成你的行信息
}
}
在跳转后的页面分解你的value参数值进行split("$"),等到这一行的所有信息
protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", "window.location.href='页面地址'");
}
}
怎么又是这问题,难道是同班的?