HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/TDijk1/erp-apps.eu/wwwroot/CMSModules/Groups/Tools/Group_New.aspx.cs
using System;

using CMS.Core;
using CMS.Helpers;
using CMS.PortalEngine;
using CMS.SiteProvider;
using CMS.UIControls;

[UIElement(ModuleName.GROUPS, "NewGroup")]
public partial class CMSModules_Groups_Tools_Group_New : CMSGroupPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // Pagetitle
        PageTitle.TitleText = GetString("Group.NewHeaderCaption");
        // Initialize breadcrumbs
        PageBreadcrumbs.Items.Add(new BreadcrumbItem()
        {
            Text = GetString("Group.ItemListLink"),
            RedirectUrl = ResolveUrl("~/CMSModules/Groups/Tools/Group_List.aspx"),
        });
        PageBreadcrumbs.Items.Add(new BreadcrumbItem()
        {
            Text = GetString("Group.NewItemCaption"),
        });

        if (SiteContext.CurrentSite != null)
        {
            groupEditElem.SiteID = SiteContext.CurrentSite.SiteID;
        }

        groupEditElem.OnSaved += new EventHandler(groupEditElem_OnSaved);
        groupEditElem.DisplayAdvanceOptions = true;
        groupEditElem.IsLiveSite = false;
    }


    private void groupEditElem_OnSaved(object sender, EventArgs e)
    {
        // Redirect to edit page
        string editUrl = UIContextHelper.GetElementUrl("CMS.Groups", "EditGroup");
        editUrl = URLHelper.AddParameterToUrl(editUrl, "objectid", groupEditElem.GroupID.ToString());
        editUrl = URLHelper.AddParameterToUrl(editUrl, "displaytitle", "false");
        URLHelper.Redirect(editUrl);
    }
}