GridView 邦定数据源后怎么取某个行的某个字段(关键字字段)
SqlConnection con = Class_data.CreateCon();
con.Open();
SqlCommand cmd = new SqlCommand( "select * from VIEW_action_user ", con);
GridView1.DataSource = cmd.ExecuteReader();
string user_id = GridView1.SelectedDataKey.ToString();//这个为什么取不到???
GridView1.DataBind();
con.Close();
------解决方案--------------------cell[2].tostring