如何在GridView的RowDeleting事件中获得当前行的DataKey值

    //删除店铺之前,先把相关的分类数据从数据库中删除
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    
{
        
int dietStoreID = Convert.ToInt32(e.Keys[0]);
        DietStoreClassDetails.DeleteDietStoreClass(dietStoreID);
    }
posted @ 2007-11-02 11:46  Fernando  阅读(2628)  评论(2编辑  收藏  举报