求一段gridview双击传值的思路或者代码 gridview绑定dataset 1 2 3 4 5 6 7a tbcdef假如我单击或者t这个单元格 我要把4和a穿到新窗口应该怎么传 应该在什么事件里写? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 为什么不是传t里的值?大多数情况传索引和字段的位置没什么意义如果要实现,肯定是在服务器注册行的onclick事件 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { for (int i = 0; i < e.Row.Cells.Count; i++) { e.Row.Cells[i].Attributes.Add("onclick", "window.open('details.aspx?row=" + e.Row.RowIndex + "&col=" + i + "')"); } } } Details.aspx protected void Page_Load(object sender, EventArgs e) { Response.Write(Request.QueryString["row"] + " " + Request.QueryString["col"]); } 把你要传值的列变成模板列。。然后传该模板列。。rowdatabound事件 dropdownlist 添加值时如何确保没有重复的值? 求Infragistics NetAdvantage 2004 Vol.2 版本 GridView分页显示问题【百万数据】 50分:请问怎样把程序打包成setup.exe.谢谢。 子控件调用母控件的问题,谢谢 checkboxlist下划线怎么弄 sealed类 实现IDisposable 接口的问题 网页字符串替换问题 视频问题 在sql2000图片怎么处理才合理? ASP.NET 调试问题(如何使#if DEBUG 起作用) page的生命周期?请形象化说说
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
for (int i = 0; i < e.Row.Cells.Count; i++)
{
e.Row.Cells[i].Attributes.Add("onclick", "window.open('details.aspx?row=" + e.Row.RowIndex + "&col=" + i + "')");
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Request.QueryString["row"] + " " + Request.QueryString["col"]);
}
rowdatabound事件