Source included Base class for EPiServer pages with read-only functionality.

Namespace:  EPiServer
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236

Syntax

C#
public class SimplePage : PageBase

Remarks

Pages that inherit from SimplePage have all the other capabilities that TemplatePage descendents have, meaning that you can still add EPiServer properties and edit their contents. However, when a Web page inheriting from SimplePage is displayed, you will not have access to Admin mode or Edit mode from the shortcut menu.
CopyC#
#region Copyright � 1997-2008 EPiServer AB. All Rights Reserved.
/*
This code may only be used according to the EPiServer License Agreement.
The use of this code outside the EPiServer environment, in whole or in
parts, is forbidden without prior written permission from EPiServer AB.

EPiServer is a registered trademark of EPiServer AB. For more information 
see http://www.episerver.com/license or request a copy of the EPiServer 
License Agreement by sending an email to info@episerver.com*/

#endregion

using System;
using System.Collections.Specialized;
using EPiServer.Core;
using EPiServer.Security;
using EPiServer.Web.PageExtensions;

namespace EPiServer
{

    /// <summary>
    /// <img src="Icons/CSharp.gif" alt="Source included" border="0" /> 
    /// Base class for EPiServer pages with read-only functionality.
    /// </summary>
    /// <remarks>
    /// Pages that inherit from <b>SimplePage</b> have all the other capabilities that 
    /// <b>TemplatePage</b> descendents have, meaning that you can still add EPiServer 
    /// properties and edit their contents. However, when a Web page inheriting 
    /// from <b>SimplePage</b> is displayed, you will not have access to Admin mode or 
    /// Edit mode from the shortcut menu.
    /// <code source="../EPiServerNET/SimplePage.cs" lang="cs"/>
    /// </remarks>
    /// <example>
    /// The following example demonstrates a Web form that inherits from SimplePage.
    /// <code source="../CodeSamples/EPiServer/SimplePageSamples.cs" region="WebForm" />
    /// </example>
    public class SimplePage : PageBase
    {
        /// <summary>
        /// Initializes a new instance of <see cref="SimplePage"/>
        /// </summary>
        public SimplePage()
            : this(0, 0)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SimplePage"/> class.
        /// </summary>
        /// <param name="options">The page options to enable.</param>
        /// <remarks>
        /// The options parameter is a bitmap constructed from the OptionFlag of Page plugin classes from
        /// the EPiServer.Web.PageExtensions namespace.
        /// </remarks>
        public SimplePage(int options)
            : base(options)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SimplePage"/> class.
        /// </summary>
        /// <param name="enable">The enable.</param>
        /// <param name="disable">The disable.</param>
        public SimplePage(int enable, int disable)
            : base(SiteRedirect.OptionFlag | enable, disable)
        {
        }
    }
}

Examples

The following example demonstrates a Web form that inherits from SimplePage.
CopyC#
public class Default : SimplePage 
{
    // ...
}

Inheritance Hierarchy

System..::.Object
  System.Web.UI..::.Control
    System.Web.UI..::.TemplateControl
      System.Web.UI..::.Page
        EPiServer..::.PageBase
          EPiServer..::.SimplePage
            EPiServer..::.EditPage

See Also