how to add ScriptEditorWebPart to PageLayout

the simple secret is that the ID of the webpart MUST be a guid, example

<WebPartPages:ScriptEditorWebPart
    runat="server"
    Content="&lt;script&gt;alert(&#39;hi&#39;);&lt;/script&gt;"
    ID="g_9db1223f_1234_44df_ad5d_e6454520ddfa" >
</WebPartPages:ScriptEditorWebPart>

Comments

Popular posts from this blog

c# Service Play Sound with NAudio example by Moshe

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem

JS/JQ simulate Enter event