Dynamicweb 8 Documentation
Optimized Field
Example 

Page optimized notification. Occurs after the page has been optimized.
Syntax
'Declaration
 
Public Const Optimized As String
public const string Optimized
Example
Overriding the page optimized in DynamicwebOverriding the page optimizaed in Dynamicweb
namespace Dynamicweb.Examples.CSharp.Notifications.Standard
{
    [Extensibility.Subscribe(Dynamicweb.Notifications.Standard.Page.Optimized)]
    public class PageOptimizedObserver : Dynamicweb.Extensibility.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.NotificationArgs args)
        {
            if (args == null)
                return;

            Dynamicweb.Notifications.Standard.Page.PageNotificationArgs pna = (Dynamicweb.Notifications.Standard.Page.PageNotificationArgs)args;

            //To do - insert your code here

        }
    }
}
Namespace Notifications.Standard
    <Extensibility.Subscribe(Global.Dynamicweb.Notifications.Standard.Page.Optimized)> _
    Public Class PageOptimizedObserver
        Inherits Global.Dynamicweb.Extensibility.NotificationSubscriber

        Public Overrides Sub OnNotify(ByVal notification As String, ByVal args As Global.Dynamicweb.Extensibility.NotificationArgs)
            If args Is Nothing Then
                Return
            End If

            Dim pna As Global.Dynamicweb.Notifications.Standard.Page.PageNotificationArgs = DirectCast(args, Global.Dynamicweb.Notifications.Standard.Page.PageNotificationArgs)

            'To do - insert your code here

        End Sub
    End Class
End Namespace
Remarks
The passed NotificationArgs is Dynamicweb.Notifications.Standard.Page.PageNotificationArgs
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Standard.Page Class
Standard.Page Members

Send Feedback