{"id":16,"date":"2007-08-16T20:11:00","date_gmt":"2007-08-17T02:11:00","guid":{"rendered":"http:\/\/localhost\/todd_wp\/connected-page-viewer-web-part\/"},"modified":"2013-07-01T14:07:04","modified_gmt":"2013-07-01T20:07:04","slug":"connected-page-viewer-web-part","status":"publish","type":"post","link":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/","title":{"rendered":"Connected Page Viewer Web Part"},"content":{"rendered":"\n<p>This is a repost of an article on my blog that was lost during a server failure.\u00a0 Historically, this\u00a0has been one of the most popular\u00a0articles on my blog, so I dug up the code and put it back online.<\/p>\n<p>The code you will find below is for a Connected Page Viewer Web Part for WSS V2 and SPS 2003.\u00a0 The Connected Page Viewer Web Part consumes a URL from another Web Part that provides URLs.\u00a0 This Web Part WORKS GREAT in WSS V3 and MOSS 2007 as well.<\/p>\n<p>Enjoy!<\/p>\n<p>using System;<br \/>using System.Web.UI;<br \/>using System.Web.UI.WebControls;<br \/>using System.ComponentModel;<br \/>using System.Xml.Serialization;<br \/>using System.Security;<br \/>using System.Security.Permissions;<br \/>using Microsoft.SharePoint;<br \/>using Microsoft.SharePoint.Utilities;<br \/>using Microsoft.SharePoint.WebPartPages;<br \/>using Microsoft.SharePoint.WebPartPages.Communication;<br \/>using System.Text;<br \/>using System.IO;\n<\/p>\n<p>namespace Custom.SharePoint.WebParts<br \/>{<br \/>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ This Web Part displays the contents of a URL that is passed in from a provider web part.<br \/>\/\/\/ &lt;\/summary&gt;<br \/>[DefaultProperty(&#8220;Text&#8221;),<br \/>ToolboxData(&#8220;&lt;{0}:ConsumerPageViewer runat=server&gt;&lt;\/{0}:ConsumerPageViewer&gt;&#8221;),<br \/>XmlRoot(Namespace=&#8221;Custom.SharePoint.WebParts&#8221;)]<br \/>public class ConsumerPageViewer : WebPart , ICellConsumer<br \/>{<br \/>#region Properties\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ The URL to display in the IFRAME<br \/>\/\/\/ &lt;\/summary&gt;<br \/>private string pageUrl = string.Empty;<br \/>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ The property that exposes the pageUrl variable<br \/>\/\/\/ &lt;\/summary&gt;<br \/>[Browsable(true), <br \/>Category(&#8220;Customization&#8221;), <br \/>DefaultValue(&#8220;&#8221;), <br \/>WebPartStorage(Storage.Personal), <br \/>FriendlyName(&#8220;Page Url&#8221;), <br \/>Description(&#8220;Default page URL such as <a href=\"http:\/\/www.sharepointexperts.com%22)]\/\" mce_href=\"http:\/\/www.sharepointexperts.com&quot;)]\">http:\/\/www.sharepointexperts.com&#8221;)]<\/a><br \/>public string PageUrl<br \/>{<br \/>get {return pageUrl;}<br \/>set {pageUrl = value;}<br \/>}\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ Variable to toggle if the URL of the content in the web part is displayed.<br \/>\/\/\/ &lt;\/summary&gt;<br \/>private bool showPageUrl = false;<br \/>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ The property that exposes the showPageUrl variable<br \/>\/\/\/ &lt;\/summary&gt;<br \/>[Browsable(true), <br \/>Category(&#8220;Customization&#8221;), <br \/>DefaultValue(false), <br \/>WebPartStorage(Storage.Shared), <br \/>FriendlyName(&#8220;Show Page Url&#8221;), <br \/>Description(&#8220;Specifies if the URL of the content in the web part is displayed.&#8221;)]<br \/>public bool ShowPageUrl<br \/>{<br \/>get {return showPageUrl;}<br \/>set {showPageUrl = value;}<br \/>}<br \/>#endregion<br \/>\/\/ Event required by ICellConsumer<br \/>public event CellConsumerInitEventHandler CellConsumerInit;\n<\/p>\n<p>\/\/ Keep a count of ICellConsumer connections.<br \/>private int cellConnectedCount = 0;\n<\/p>\n<p>\/\/ Cell information<br \/>private string cellName = &#8220;Cell Data&#8221;\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ Register interfaces.<br \/>\/\/\/ &lt;\/summary&gt;<br \/>public override void EnsureInterfaces()<br \/>{<br \/>try<br \/>{<br \/>\/\/ Register the ICellConsumer interface.<br \/>RegisterInterface(&#8220;CellConsumer_WPQ_&#8221;, <br \/>&#8220;ICellConsumer&#8221;, <br \/>WebPart.UnlimitedConnections, <br \/>ConnectionRunAt.Server, <br \/>this, <br \/>&#8220;CellConsumer_WPQ_&#8221;, <br \/>&#8220;Consumes a cell from&#8221;, <br \/>&#8220;Consumes a cell of data&#8221;); <br \/>} <br \/>catch(SecurityException)<br \/>{<br \/>}<br \/>}\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ This method is called by the framework to determine whether a part <br \/>\/\/\/ can be run on the client or server based on the current<br \/>\/\/\/ configuration.<br \/>\/\/\/ &lt;\/summary&gt;<br \/>public override ConnectionRunAt CanRunAt()<br \/>{<br \/>return ConnectionRunAt.Server;<br \/>}\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ Notification to the Web Part that it has been connected<br \/>\/\/\/ &lt;\/summary&gt;<br \/>\/\/\/ &lt;param name=&#8221;interfaceName&#8221;&gt;Unique name of the interface that is being connected&lt;\/param&gt;<br \/>\/\/\/ &lt;param name=&#8221;connectedPart&#8221;&gt;Reference to the other Web Part that is being connected to&lt;\/param&gt;<br \/>\/\/\/ &lt;param name=&#8221;connectedInterfaceName&#8221;&gt;Unique name of the interface on the other Web Part&lt;\/param&gt;<br \/>\/\/\/ &lt;param name=&#8221;runAt&#8221;&gt;Where the interface should execute&lt;\/param&gt;<br \/>public override void PartCommunicationConnect(string interfaceName,<br \/>WebPart connectedPart,<br \/>string connectedInterfaceName,<br \/>ConnectionRunAt runAt)<br \/>{<br \/>EnsureChildControls(); <br \/>if (interfaceName == &#8220;CellConsumer_WPQ_&#8221;)<br \/>{<br \/>cellConnectedCount++;<br \/>}<br \/>}\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ In this method, a part should fire any connection init events.<br \/>\/\/\/ &lt;\/summary&gt;<br \/>public override void PartCommunicationInit()<br \/>{<br \/>if(cellConnectedCount &gt; 0)<br \/>{<br \/>if (CellConsumerInit != null)<br \/>{<br \/>CellConsumerInitEventArgs cellConsumerInitArgs = new CellConsumerInitEventArgs();<br \/>cellConsumerInitArgs.FieldName = cellName;<br \/>CellConsumerInit(this, cellConsumerInitArgs);<br \/>}<br \/>}<br \/>}\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ This method is called by the Authoring environment for all<br \/>\/\/\/ the initial data required for creating a connection.<br \/>\/\/\/ &lt;\/summary&gt;<br \/>\/\/\/ &lt;param name=&#8221;interfacename&#8221;&gt;Name of interface that the framework is<br \/>\/\/\/ requesting information on&lt;\/param&gt;<br \/>\/\/\/ &lt;returns&gt;An EventArgs object such as CellProviderInitArgs&lt;\/returns&gt;<br \/>public override InitEventArgs GetInitEventArgs(string interfaceName)<br \/>{<br \/>if (interfaceName == &#8220;CellConsumer_WPQ_&#8221;)<br \/>{<br \/>EnsureChildControls();<br \/>CellConsumerInitEventArgs cellConsumerInitArgs = new CellConsumerInitEventArgs(); <br \/>cellConsumerInitArgs.FieldName = cellName;<br \/>return(cellConsumerInitArgs);<br \/>}<br \/>else<br \/>{<br \/>return(null);<br \/>}<br \/>}\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ The CellProviderInit event handler<br \/>\/\/\/ The Provider part will fire this event during its PartCommunicationInit phase.<br \/>\/\/\/ &lt;\/summary&gt;<br \/>\/\/\/ &lt;param name=&#8221;sender&#8221;&gt;Provider Web Part&lt;\/param&gt;<br \/>\/\/\/ &lt;param name=&#8221;cellProviderInitArgs&#8221;&gt;The args passed by the Provider&lt;\/param&gt;<br \/>public void CellProviderInit(object sender, CellProviderInitEventArgs cellProviderInitArgs)<br \/>{<br \/>\/\/ This is where the Consumer part can identify what type of &#8220;Cell&#8221; the Provider<br \/>\/\/ will be sending.<br \/>}\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ The CellReady event handler<br \/>\/\/\/ The Provider part will fire this event during its PartCommunicationMain phase.<br \/>\/\/\/ &lt;\/summary&gt;<br \/>\/\/\/ &lt;param name=&#8221;sender&#8221;&gt;Provider Web Part&lt;\/param&gt;<br \/>\/\/\/ &lt;param name=&#8221;cellReadyArgs&#8221;&gt;The args passed by the Provider&lt;\/param&gt;<br \/>public void CellReady(object sender, CellReadyEventArgs cellReadyArgs)<br \/>{<br \/>if(cellReadyArgs.Cell != null)<br \/>{<br \/>pageUrl = cellReadyArgs.Cell.ToString();<br \/>}<br \/>}\n<\/p>\n<p>\/\/\/ &lt;summary&gt; <br \/>\/\/\/ Render this Web Part control to the output parameter specified.<br \/>\/\/\/ &lt;\/summary&gt;<br \/>\/\/\/ &lt;param name=&#8221;output&#8221;&gt; The HTML writer to write out to &lt;\/param&gt;<br \/>protected override void Render(HtmlTextWriter output)<br \/>{<br \/>\/\/The following objects are used to created the iframe in the web part and return the contents of the link to the IFRAME<br \/>StringBuilder buffer = new StringBuilder(10240);<br \/>StringWriter InnerWriter = new StringWriter(buffer);<br \/>HtmlTextWriter BufferWriter = new HtmlTextWriter(InnerWriter);\n<\/p>\n<p>try <br \/>{ <br \/>\/\/Call method to write HTML to buffer<br \/>WriteWebPartContent(BufferWriter);<br \/>\/\/Write HTML back to browser<br \/>output.Write(buffer); <br \/>}<br \/>catch (System.Exception Ex)<br \/>{ <br \/>} <br \/>}\n<\/p>\n<p>\/\/\/ &lt;summary&gt;<br \/>\/\/\/ This method generates the HTML to display the IFRAME and the page content inside it<br \/>\/\/\/ &lt;\/summary&gt;<br \/>\/\/\/ &lt;param name=&#8221;output&#8221;&gt;The HTMLTextWriter to send the output to&lt;\/param&gt;<br \/>protected void WriteWebPartContent(HtmlTextWriter output)<br \/>{<br \/>try<br \/>{<br \/>string frame = &#8220;outputIFrame_&#8221; + base.Qualifier;\n<\/p>\n<p>output.AddStyleAttribute(&#8220;display&#8221;, &#8220;inline&#8221;);<br \/>output.AddAttribute(HtmlTextWriterAttribute.Id, frame);<br \/>output.AddAttribute(HtmlTextWriterAttribute.Name, frame);<br \/>output.AddStyleAttribute(HtmlTextWriterStyle.Width, &#8220;100%&#8221;);<br \/>output.AddStyleAttribute(HtmlTextWriterStyle.Height, &#8220;100%&#8221;);<br \/>output.AddAttribute(&#8220;frameBorder&#8221;, &#8220;0&#8221;);<br \/>output.AddAttribute(HtmlTextWriterAttribute.Src, pageUrl);<br \/>output.RenderBeginTag(HtmlTextWriterTag.Iframe);<br \/>output.RenderEndTag();\n<\/p>\n<p>\/\/If the web part is configured to show the page url then display it<br \/>if (showPageUrl == true)<br \/>{<br \/>output.Write( &#8220;&lt;BR&gt;This web part is displaying content from the following URL: &#8221; + SPEncode.HtmlEncode(pageUrl) + &#8220;&lt;BR&gt;&#8221;);<\/p>\n<p>output.Write( &#8220;&lt;BR&gt;EASTER EGG! Ski lifts open in 97 days from the date I reposted this article!&lt;BR&gt;&#8221;);<\/p>\n<p>}<br \/>}<br \/>catch (System.Exception Ex)<br \/>{<br \/>}<br \/>}<br \/>}<br \/>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a repost of an article on my blog that was lost during a server failure.\u00a0 Historically, this\u00a0has been one of the most popular\u00a0articles on<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[97,84],"tags":[10,5,7],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-sharepoint","category-sharepoint-2007","tag-custom-development","tag-helpful-code","tag-sharepoint"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"This is a repost of an article on my blog that was lost during a server failure. Historically, this has been one of the most popular articles on my blog, so I dug up the code and put it back online. The code you will find below is for a Connected Page Viewer Web Part for WSS\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Todd Baginski\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Todd Baginski&#039;s Blog - An AI, SharePoint, Office 365, Azure, Power Apps, Power Platform, and Mobile Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Connected Page Viewer Web Part - Todd Baginski&#039;s Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"This is a repost of an article on my blog that was lost during a server failure. Historically, this has been one of the most popular articles on my blog, so I dug up the code and put it back online. The code you will find below is for a Connected Page Viewer Web Part for WSS\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2007-08-17T02:11:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2013-07-01T20:07:04+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@toddbaginski\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Connected Page Viewer Web Part - Todd Baginski&#039;s Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This is a repost of an article on my blog that was lost during a server failure. Historically, this has been one of the most popular articles on my blog, so I dug up the code and put it back online. The code you will find below is for a Connected Page Viewer Web Part for WSS\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@toddbaginski\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/#blogposting\",\"name\":\"Connected Page Viewer Web Part - Todd Baginski's Blog\",\"headline\":\"Connected Page Viewer Web Part\",\"author\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/tb-1.png\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/#articleImage\",\"width\":114,\"height\":60},\"datePublished\":\"2007-08-16T20:11:00-04:00\",\"dateModified\":\"2013-07-01T14:07:04-04:00\",\"inLanguage\":\"en\",\"commentCount\":3,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/#webpage\"},\"articleSection\":\"SharePoint, SharePoint 2007, Custom Development, Helpful Code, SharePoint\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/toddbaginski.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/#listItem\",\"name\":\"SharePoint\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/#listItem\",\"position\":2,\"name\":\"SharePoint\",\"item\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/sharepoint-2007\\\/#listItem\",\"name\":\"SharePoint 2007\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/sharepoint-2007\\\/#listItem\",\"position\":3,\"name\":\"SharePoint 2007\",\"item\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/sharepoint-2007\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/#listItem\",\"name\":\"Connected Page Viewer Web Part\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/#listItem\",\"name\":\"SharePoint\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/#listItem\",\"position\":4,\"name\":\"Connected Page Viewer Web Part\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/sharepoint-2007\\\/#listItem\",\"name\":\"SharePoint 2007\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#person\",\"name\":\"Todd Baginski\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/#author\",\"url\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/\",\"name\":\"Todd Baginski\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/#webpage\",\"url\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/\",\"name\":\"Connected Page Viewer Web Part - Todd Baginski's Blog\",\"description\":\"This is a repost of an article on my blog that was lost during a server failure. Historically, this has been one of the most popular articles on my blog, so I dug up the code and put it back online. The code you will find below is for a Connected Page Viewer Web Part for WSS\",\"inLanguage\":\"en\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/connected-page-viewer-web-part\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/#author\"},\"datePublished\":\"2007-08-16T20:11:00-04:00\",\"dateModified\":\"2013-07-01T14:07:04-04:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/\",\"name\":\"Todd Baginski's Blog\",\"description\":\"An AI, SharePoint, Office 365, Azure, Power Apps, Power Platform, and Mobile Blog\",\"inLanguage\":\"en\",\"publisher\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Connected Page Viewer Web Part - Todd Baginski's Blog","description":"This is a repost of an article on my blog that was lost during a server failure. Historically, this has been one of the most popular articles on my blog, so I dug up the code and put it back online. The code you will find below is for a Connected Page Viewer Web Part for WSS","canonical_url":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/#blogposting","name":"Connected Page Viewer Web Part - Todd Baginski's Blog","headline":"Connected Page Viewer Web Part","author":{"@id":"https:\/\/toddbaginski.com\/blog\/author\/todd\/#author"},"publisher":{"@id":"https:\/\/toddbaginski.com\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2026\/02\/tb-1.png","@id":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/#articleImage","width":114,"height":60},"datePublished":"2007-08-16T20:11:00-04:00","dateModified":"2013-07-01T14:07:04-04:00","inLanguage":"en","commentCount":3,"mainEntityOfPage":{"@id":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/#webpage"},"isPartOf":{"@id":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/#webpage"},"articleSection":"SharePoint, SharePoint 2007, Custom Development, Helpful Code, SharePoint"},{"@type":"BreadcrumbList","@id":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/toddbaginski.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/#listItem","name":"SharePoint"}},{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/#listItem","position":2,"name":"SharePoint","item":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/","nextItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2007\/#listItem","name":"SharePoint 2007"},"previousItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2007\/#listItem","position":3,"name":"SharePoint 2007","item":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2007\/","nextItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/#listItem","name":"Connected Page Viewer Web Part"},"previousItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/#listItem","name":"SharePoint"}},{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/#listItem","position":4,"name":"Connected Page Viewer Web Part","previousItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2007\/#listItem","name":"SharePoint 2007"}}]},{"@type":"Person","@id":"https:\/\/toddbaginski.com\/blog\/#person","name":"Todd Baginski"},{"@type":"Person","@id":"https:\/\/toddbaginski.com\/blog\/author\/todd\/#author","url":"https:\/\/toddbaginski.com\/blog\/author\/todd\/","name":"Todd Baginski"},{"@type":"WebPage","@id":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/#webpage","url":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/","name":"Connected Page Viewer Web Part - Todd Baginski's Blog","description":"This is a repost of an article on my blog that was lost during a server failure. Historically, this has been one of the most popular articles on my blog, so I dug up the code and put it back online. The code you will find below is for a Connected Page Viewer Web Part for WSS","inLanguage":"en","isPartOf":{"@id":"https:\/\/toddbaginski.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/#breadcrumblist"},"author":{"@id":"https:\/\/toddbaginski.com\/blog\/author\/todd\/#author"},"creator":{"@id":"https:\/\/toddbaginski.com\/blog\/author\/todd\/#author"},"datePublished":"2007-08-16T20:11:00-04:00","dateModified":"2013-07-01T14:07:04-04:00"},{"@type":"WebSite","@id":"https:\/\/toddbaginski.com\/blog\/#website","url":"https:\/\/toddbaginski.com\/blog\/","name":"Todd Baginski's Blog","description":"An AI, SharePoint, Office 365, Azure, Power Apps, Power Platform, and Mobile Blog","inLanguage":"en","publisher":{"@id":"https:\/\/toddbaginski.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Todd Baginski's Blog - An AI, SharePoint, Office 365, Azure, Power Apps, Power Platform, and Mobile Blog","og:type":"article","og:title":"Connected Page Viewer Web Part - Todd Baginski's Blog","og:description":"This is a repost of an article on my blog that was lost during a server failure. Historically, this has been one of the most popular articles on my blog, so I dug up the code and put it back online. The code you will find below is for a Connected Page Viewer Web Part for WSS","og:url":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/","og:image":"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg","og:image:secure_url":"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg","article:published_time":"2007-08-17T02:11:00+00:00","article:modified_time":"2013-07-01T20:07:04+00:00","twitter:card":"summary","twitter:site":"@toddbaginski","twitter:title":"Connected Page Viewer Web Part - Todd Baginski's Blog","twitter:description":"This is a repost of an article on my blog that was lost during a server failure. Historically, this has been one of the most popular articles on my blog, so I dug up the code and put it back online. The code you will find below is for a Connected Page Viewer Web Part for WSS","twitter:creator":"@toddbaginski","twitter:image":"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg"},"aioseo_meta_data":{"post_id":"16","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2022-02-14 15:49:25","updated":"2025-06-03 20:45:31"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/toddbaginski.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/\" title=\"SharePoint\">SharePoint<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2007\/\" title=\"SharePoint 2007\">SharePoint 2007<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tConnected Page Viewer Web Part\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/toddbaginski.com\/blog"},{"label":"SharePoint","link":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/"},{"label":"SharePoint 2007","link":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2007\/"},{"label":"Connected Page Viewer Web Part","link":"https:\/\/toddbaginski.com\/blog\/connected-page-viewer-web-part\/"}],"_links":{"self":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":1,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"predecessor-version":[{"id":852,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts\/16\/revisions\/852"}],"wp:attachment":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}