• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 659
  • Last Modified:

Using Page Viewer Web Part to display a specific portion of a page

What is the best way to display only a specific portion of a page in a page viewer web part. i.e., without displaying the header and the footer of the page inside the Page Viewer.
  • 4
3 Solutions
the pageviewer webpart (PVWP) is just an iframe... yup pretty pathetic. MS could have just add a parameter to the content editor web part.

Anyway, you can't. What ever the page looks like is how you get it, except in a frame. You can do some programming and use an HttpRequest object client or serverside, to get the content at certain points. But you can't do didley  with the PVWP
torameshAuthor Commented:
But isn't it possible to retrict the html displayed in the "iframe" by specifying a start tag and end tag. i.e., create a web part, get the start tage and end tag from users and display html only within those tags? Is this possible or am I just going in the wrong direction?
Well you have access to the DOM so maybe you getElementById and set the tags you don't want to see to hidden.

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Yes, that's what I mean by "programming", but not with the PVWP.
Chances are you'll have to look for a specific string.

So your JS/C# will be like.

HttpObj.Response.Substring(HttpObj.Response.IndexOf("myStartStr"), HttpObj.Response.IndexOf("myEndStr"))
Question answered.

ID:24024495 answered the question.
ID:24024645 elaborated on the answer.
ID:24024837 elaborated on the answer.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now