如何获取HyperLinkField列在gridview中显示在单个单元格中的文本 如何获取HyperLinkField列在gridview中显示在单个单元格中的文本 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 protected void gvData_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "MyCommand") { Button button = (Button)e.CommandSource; GridViewRow row = (GridViewRow)button.Parent.Parent; string a = row.Cells[1].Text.ToString();//获得第一个单元格的值 string b = this.gvData.DataKeys[row.DataItemIndex].Values[0].ToString();//获得DataKeys的值 } } ((HyperLink)GridView1.Rows[0].Cells[1].Controls[0]).Text 二楼获取的是第一行吧 ,再加一个循环..... 用findcontrol也可以 搞定了,先将HyperLinkField转换为模板,再((HyperLink)GridView1.Rows[i].FindControl("HyperLink1")).Text 求高手指点jquery 的datatables插件问题 登陆时验证报错! 我想找师傅,顺便问下merbership身份系统有多少人在用? 求一遍历树的存储过程 框架中session失效页面跳转问题 通过Ajax方式返回HTML的简单方法 禁用超连接 类型突然转换不过去 100分求ASP(不是.NET) 调用SQL SERVER的存储过程,且存储过程中有多个select 语句,故需要返回多个记录集,请问这样可以做到吗?怎样做呢 asp.net在什么时候生成__doPostBack()方法? 关于datalist绑定列的问题 实现10个人同时登录系统记录他们的操作行为
{
if (e.CommandName == "MyCommand")
{
Button button = (Button)e.CommandSource;
GridViewRow row = (GridViewRow)button.Parent.Parent;
string a = row.Cells[1].Text.ToString();//获得第一个单元格的值
string b = this.gvData.DataKeys[row.DataItemIndex].Values[0].ToString();//获得DataKeys的值
}
}