private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
e.Item.Attributes.Add("ondblClick","javascript:window.location.href='index.aspx?CName="+Name+"';");
}
我想双击DataGrid的时候,把DataGrid中的绑定字段"姓名"传给Index页面,怎么在DataGrid1_ItemDataBound事件中得到绑定字段"姓名",然后传送出去呢,或者有别的方法吗?谢谢了
{
e.Item.Attributes.Add("ondblClick","javascript:window.location.href='index.aspx?CName="+Name+"';");
}
我想双击DataGrid的时候,把DataGrid中的绑定字段"姓名"传给Index页面,怎么在DataGrid1_ItemDataBound事件中得到绑定字段"姓名",然后传送出去呢,或者有别的方法吗?谢谢了
{
string Name=DataBinder.Eval(e.Item.DataItem,"CustomerName").ToString();
e.Item.Attributes.Add("ondblClick","javascript:window.location.href='index.aspx?CName="+Name+"';close();");
}