3

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?

1
  • 1
    i got the solution : PageViewerWebPart oWebPart = new PageViewerWebPart(); oWebPart.ContentLink = "mindtree.com"; this.Controls.Add(oWebPart);
    – Nikhil J
    Sep 7, 2010 at 6:38

2 Answers 2

1

From comment:

PageViewerWebPart oWebPart = new PageViewerWebPart();
oWebPart.ContentLink = "mindtree.com";
this.Controls.Add(oWebPart);
0

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

oWebPart.ContentLink = "http://www.cnn.com";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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