GridView中双击某一行时跳转到另外一个页面
2011-10-13 10:31
267 查看
GridView中可以这样写
protected void grvList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "c=style.backgroundColor;style.backgroundColor='#add8e6'");
e.Row.Attributes.Add("onmouseout", "style.backgroundColor=c");
//double click
string strId = grvList.DataKeys[e.Row.RowIndex].Value.ToString();
e.Row.Attributes.Add("ondblclick", "location.href='test.aspx?Id=" + strId + "'");
e.Row.Attributes["style"] = "Cursor:hand";
}
}
protected void grvList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "c=style.backgroundColor;style.backgroundColor='#add8e6'");
e.Row.Attributes.Add("onmouseout", "style.backgroundColor=c");
//double click
string strId = grvList.DataKeys[e.Row.RowIndex].Value.ToString();
e.Row.Attributes.Add("ondblclick", "location.href='test.aspx?Id=" + strId + "'");
e.Row.Attributes["style"] = "Cursor:hand";
}
}
相关文章推荐
- GridView跳转到另外一个页面2种方法
- js / ajax 成功提交后怎么跳转到另外一个页面?
- Jquery 实现点击一个页面跳转后在另外一个页面显示指定位置
- jsp学习之路之实现一个用户信息页面并实现跳转到另外一个页面输出用户的相关信息
- asp.net跳转到另外一个页面的中间部位和将站点生成静态页
- php中一个header()跳转到另外一个页面后要加exit()
- JS如何实现在一个页面停留1分钟跳转另外一个页面?
- H5地理位置定位,实现点击某一个点,跳转进另外一个页面
- 一个简单的demo模拟登录过程页面跳转逻辑和双击退出应用
- php中一个header()跳转到另外一个页面后要加exit()
- gridview鼠标双击事件(跳转至新页面并传值)单击获取值
- 前一个页面加载完成后,自动跳转到另外一个页面
- javascript笔记——点击按钮(或超链接)如何跳转到另外一个页面并执行目标页面的js函数
- 双击一个图片然后跳转到另一个页面去
- 【代码笔记】点击搜索跳转到另外一个页面
- JSP 跳转到另外一个页面时,记得传值
- 【代码笔记】点击搜索跳转到另外一个页面
- .Net有关问题。在GridView中添加了一个HyperLinkField,用来显示显示详细信息,请教跳转后的详细信息页面该怎样写代码
- 点击连接如果连接打不开跳转到另外一个页面的实现
- 点击按钮(或超链接)如何跳转到另外一个页面并执行目标页面的js函数