日期:2014-05-18 浏览次数:20382 次
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" OnClientClick="return isSelected()" />
------解决方案--------------------
我晕..
解决了..
白写了半天..
------解决方案--------------------
呵呵,JF~~~~
------解决方案--------------------
protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[4].Attributes.Add("onclick", "return confirm('你真的要删除吗!!!')");
}
}
protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string id;
foreach (GridViewRow gr in GridView2.Rows)
{
CheckBox ck=((CheckBox) GridView2.Rows[e.RowIndex].Cells[0].FindControl("Chkitem")).Text;
id= ck.Text;
}
string mySql = "delete from authors where id=" + id + "";
db mydb = new db();
mydb.sql(mySql);
bind2();//数据绑定
}
------解决方案--------------------
jf
------解决方案--------------------
http://blog.csdn.net/insus/archive/2008/03/09/2159352.aspx
------解决方案--------------------
有一分吧
------解决方案--------------------
过来学习一下先
------解决方案--------------------
http://blog.csdn.net/llxchen/archive/2008/03/11/2166026.aspx
例子比较详细!