protected void grvCateNewsGroup_RowCommand(object sender, GridViewCommandEventArgs e) { int Id = Convert.ToInt32(e.CommandArgument.ToString()); string nName = e.CommandName.ToLower(); switch (nName) { case "_edit": Response.Redirect("~/Admin/editcatenewsgroup/" + Id + "/Default.aspx"); break; case "_delete": CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); catenewsGroupBSO.DeleteCateNewsGroup(Id); ViewCateGroup(); break; } }