从GridView内取选择的行值并删除
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) {
    { if (e.CommandName.Equals("Delete"))
        if (e.CommandName.Equals("Delete")) {
        { int sindex = int.Parse(e.CommandArgument.ToString());
            int sindex = int.Parse(e.CommandArgument.ToString()); string name = this.GridView1.Rows[sindex].Cells[0].Text.Trim();
            string name = this.GridView1.Rows[sindex].Cells[0].Text.Trim();
 }
        } }
    }
如果删除时 激发了未处理的事件“RowDeleting”可生成此事件但不处理
 
                    
                     
                    
                 
                    
                 
    
 
         
                
            
         
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号