I have a requirement to provide the web page URL to the Page Viewer Web Part dynamically (i.e through code).
We cannot extend the Page Viewer Web Part as it is sealed.
Please explain how to do this?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI have a requirement to provide the web page URL to the Page Viewer Web Part dynamically (i.e through code).
We cannot extend the Page Viewer Web Part as it is sealed.
Please explain how to do this?
From comment:
PageViewerWebPart oWebPart = new PageViewerWebPart();
oWebPart.ContentLink = "mindtree.com";
this.Controls.Add(oWebPart);
make sure you use the http://
otherwise it will not work...
oWebPart.ContentLink = "http://www.cnn.com";