void gvCategory_RowCommand(object sender, GridViewCommandEventArgs e) { switch (e.CommandName) { case "EditCategory": int CategoryID = 0; int.TryParse(e.CommandArgument.ToString(), out CategoryID); if (CategoryID > 0) { ViewState[CMSViewStateManager.CategoryID] = CategoryID; BeginEditMode(); upnlCategoryItem.Update(); } break; } } #endregion