protected void Row_Deleted(object sender, GridViewDeleteEventArgs e) { GridView g = (GridView)sender; string k = g.DataKeys[e.RowIndex].Value.ToString(); AdvertiseService service = new AdvertiseService(); service.DeleteAdvertiseDspModel(service.GetAdvertiseDspModelById(new Guid(k))); Response.Write("<script>alert('删除成功')</script>"); }