AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

AdvantageModule..::..RegisterTopScript Method (Literal)

Registers content to the top of the page.

Namespace:  AdvantageCMS.Core.Common.BaseClasses
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public void RegisterTopScript(
	Literal litContent
)

Parameters

litContent
Type: Literal
Literal content to be rendered at the top of the page.

Examples


Register a CSS stylesheet link at the top of the page, using a content ID to prevent duplicate registration when multiple instances of the module exist:
C#
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
    RegisterTopScript("my-module-css",
        "<link rel='stylesheet' href='/css/my-module.css' />");
}