Makes sure that the right page template is used to present a page.

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

Syntax

C#
public virtual void ValidatePageTemplate()

Remarks

This method is called as part of the page load process. If a page (as determined by the ID query string parameter on the URL) is accessed with an .aspx file that is not the correct page template file, this method will throw an exception of type EPiServerException. If you have a page type that should be displayed using different page templates, you should override this method and do your custom validation. A validation error should be signalled by throwing an EPiServerException.

See Also