private void EditContent(int ContentID)
    {
        ClearAll();
        divContentForm.Visible  = true;
        divGridContents.Visible = false;
        btnSaveContent.Text     = "Update";
        DashboardLinkController objCon  = new DashboardLinkController();
        DashboardLinkInfo       objInfo = objCon.GetLinkByID(ContentID);

        if (objInfo != null)
        {
            hdnContentID.Value = objInfo.LinkID.ToString();
            txtLinkTitle.Text  = objInfo.LinkTitle;

            chkIsactiveContent.Checked = objInfo.IsActive;
            chkIsParent.Checked        = objInfo.IsParent;
            if (objInfo.PageID != 0)
            {
                ddlPageList.SelectedValue = objInfo.PageID.ToString();
            }
            if (objInfo.ParentLinkID != 0)
            {
                ddlParentPageList.SelectedValue = objInfo.ParentLinkID.ToString();
            }
            else
            {
                ddlParentPageList.SelectedIndex = -1;
            }
        }
    }
    private void InsertUpdateContent()
    {
        DashboardLinkInfo objInfo = new DashboardLinkInfo();

        objInfo.LinkID    = Int32.Parse(hdnContentID.Value);
        objInfo.LinkTitle = txtLinkTitle.Text;
        objInfo.IsParent  = chkIsParent.Checked;

        objInfo.PageID = objInfo.IsParent ? 0 : Int32.Parse(ddlPageList.SelectedValue);

        objInfo.ParentLinkID = Int32.Parse(ddlParentPageList.SelectedValue);

        objInfo.IsActive     = chkIsactiveContent.Checked;
        objInfo.UserModuleID = userModuleID;
        objInfo.PortalID     = GetPortalID;
        objInfo.CultureCode  = GetCurrentCultureName;
        DashboardLinkController objCon = new DashboardLinkController();

        objCon.AddUpdateLink(objInfo);
        if (hdnContentID.Value == "0")
        {
            ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/DashboardSideMenu/ModuleLocalText", "Savedsuccesfully"), "", SageMessageType.Success);
        }
        else
        {
            ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/DashboardSideMenu/ModuleLocalText", "UpdatedSuccesfully"), "", SageMessageType.Success);
        }
        btnSaveContent.Text = "Save";
        ClearAll();
    }