日期:2014-05-18 浏览次数:20564 次
Response.Redirect("NewsEdit.aspx?id=" + Convert.ToInt32( GridView1.DataKeys[e.NewEditIndex].Value.ToString();));
------解决方案--------------------
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { //Response.Redirect("NewsEdit.aspx?id=" + Convert.ToInt32( GridView1.DataKeys[e.NewEditIndex].Value.ToString();)); }
------解决方案--------------------
你把那个编辑按钮设置为linkbutton 然后在NavigatorUrl='<%# Eval("NewsEdit.aspx?id={0}",主键名)%>'
------解决方案--------------------
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { Response.Redirect("NewsEdit.aspx?id=" + Convert.ToInt32( GridView1.DataKeys[e.NewEditIndex].Value.ToString();)); }