Skip to content

Instantly share code, notes, and snippets.

@SitefinityGuru
Created June 8, 2012 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SitefinityGuru/2896149 to your computer and use it in GitHub Desktop.
Save SitefinityGuru/2896149 to your computer and use it in GitHub Desktop.
Add a Control to a Sitefinity Page with Default Permissions
var ctrl = pageManager.CreateControl<PageControl>("~/Path/To/Control.ascx", "ContentPlaceholderName");
pageManager.SetControlDefaultPermissions(control);
pageData.Controls.Add(control);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment