SharePoint: How to get visual web parts embed into page layouts

  • Add the register to top of the page layout

<%@ Register tagprefix=”Prefix” namespace=”Assembly namespace” assembly=”Assembly info” %>

  • Uses the web part in the page layouts as other normal asp controls

<Prefix:Name ID=”ID” runat=”server” …. />

Example:

In the Register Section add the following:

<%@ Register tagprefix=”Custom” namespace=”CustomWebParts” assembly=”CustomWebparts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1234567890123456″ %>

In the Page content add the following:

<Custom:WebPartName ID=”ID” runat=”server” otherProp=”prop” />

Advertisements

One thought on “SharePoint: How to get visual web parts embed into page layouts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s