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/RMourik/bassol.nl/CMS/CMSAPIExamples/Pages/APIExamplesPage.Master.cs
using System;

using CMS.Helpers;
using CMS.UIControls;
using CMS.Base;

public partial class CMSAPIExamples_Pages_APIExamplesPage : CMSMasterPage
{
    #region "Properties"

    public override PageTitle Title
    {
        get
        {
            return titleElem;
        }
    }

    #endregion


    #region "Page methods"

    protected void Page_Load(object sender, EventArgs e)
    {
        lblCreateInfo.Text = "This section provides API examples for creating, getting and updating objects. It is recommended to follow the API examples order.";
        lblCleanInfo.Text = "This section provides API examples for deleting objects and their dependencies. The order of the cleanup examples is usually reversed.";
     
        if (!RequestHelper.IsPostBack())
        {
            if (SystemContext.IsRunningOnAzure)
            {
                txtCode.Text = @"
//
// Viewing of the source code is disabled on Microsoft Azure.
//";
            }
            else
            {
                txtCode.Text = @"
//
// Source code of the example will be displayed after clicking the 'View code' button.
//";
            }
        }
    }

    #endregion


    #region Events

    /// <summary>
    /// Runs all create and update examples on the page.
    /// </summary>
    protected void btnRunAll_Click(object sender, EventArgs e)
    {
        CMSAPIExamplePage examplePage = Page as CMSAPIExamplePage;
        if (examplePage != null)
        {
            examplePage.RunAll();
        }
    }


    /// <summary>
    /// Runs all cleanup examples on the page.
    /// </summary>
    protected void btnCleanAll_Click(object sender, EventArgs e)
    {
        CMSAPIExamplePage examplePage = Page as CMSAPIExamplePage;
        if (examplePage != null)
        {
            examplePage.CleanUpAll();
        }
    }

    #endregion
}