Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
1  
i got the solution : PageViewerWebPart oWebPart = new PageViewerWebPart(); oWebPart.ContentLink = "mindtree.com";; this.Controls.Add(oWebPart); –  Nikhil Sep 7 '10 at 6:38
add comment

2 Answers

From comment:

PageViewerWebPart oWebPart = new PageViewerWebPart();
oWebPart.ContentLink = "mindtree.com";
this.Controls.Add(oWebPart);
share|improve this answer
add comment

make sure you use the http:// otherwise it will not work...

oWebPart.ContentLink = "http://www.cnn.com";
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.