求助大家,GridView里面编辑项,怎么传到另外个页面进行修改
求助大家,GridView里面编辑项,怎么传到另外个页面进行修改,就是想得到当前项索引,跳转到另外个页面进行编辑,但是接收不到该值,不知道哪里出错了
编辑是个图片按钮
ImageButton edit = e.Row.FindControl("edit") as ImageButton;
edit.Attributes.Add("onclick", "edit_url(" + e.Row.Cells[0].Text + ");");这句不管用
接收编辑页面为
edit_SyUser.aspx
string cindex = Request.QueryString["CIndex"].ToString();
this.useId.Text = cindex;
SqlParameter[] pars ={User1.ParamBuilder("@CIndex", Convert.ToInt32(cindex), SqlDbType.Char)};
DataSet ds=User1.renturnDb("single_user",pars);
this.txt_name.Text = ds.Tables[0].Rows[0][1].ToString();
this.txt_userPwd.Text = ds.Tables[0].Rows[0][2].ToString();
this.ddl_department.SelectedValue = ds.Tables[0].Rows[0][3].ToString();
this.ddl_role.SelectedValue = ds.Tables[0].Rows[0][4].ToString();
this.txt_addTime.Text=ds.Tables[0].Rows[0][5].ToString(); GridView
[解决办法]