阅读背景:

如何在不使用rowcommand事件刷新的情况下删除行

来源:互联网 
protected void Gvaddproduct_RowCommand(object sender, GridViewCommandEventArgs e)
{
    if (e.CommandName.ToUpper() == "DELETE")
    {
        int? DeleteProductStatus;
        GridViewRow row = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
        int index = row.RowIndex;
        objhatcheryPL.sno1 = Convert.ToInt16(Gvaddproduct.DataKeys[index].Value);
        DeleteProductStatus = objhatcheryBAL.ProductDetDelete(objhatcheryPL);
          FillProductDetails();

        if (DeleteProductStatus.Equals(1))
        {

            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "UpdateDetails", "alert('Deleted Successful');", true);


        }

    } 


}
protected void Gvaddproduct_RowCommand(object s



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: