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/MBoogaard/oosting-horseriding.com/CMS/CMSWebParts/General/headhtml.ascx.cs
using System;
using System.Web.UI;

using CMS.Helpers;
using CMS.PortalControls;

public partial class CMSWebParts_General_headhtml : CMSAbstractWebPart
{
    #region "Public properties"

    /// <summary>
    /// Gets or sets the head HTML code.
    /// </summary>
    public string HTMLCode
    {
        get
        {
            return ValidationHelper.GetString(GetValue("HTMLCode"), "");
        }
        set
        {
            SetValue("HTMLCode", value);
        }
    }

    #endregion


    /// <summary>
    /// Content loaded event handler.
    /// </summary>
    public override void OnContentLoaded()
    {
        base.OnContentLoaded();
        SetupControl();
    }


    /// <summary>
    /// Initializes the control properties.
    /// </summary>
    protected void SetupControl()
    {
    }


    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        if (StopProcessing)
        {
            // Do nothing
        }
        else
        {
            Page.Header.Controls.Add(new LiteralControl(HTMLCode));
        }
    }
}