Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 656
  • 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.
0
toramesh
Asked:
toramesh
  • 4
3 Solutions
 
raybiesCommented:
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
0
 
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?
0
 
williamcampbellCommented:
Well you have access to the DOM so maybe you getElementById and set the tags you don't want to see to hidden.

/gotnuthin
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
raybiesCommented:
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"))
0
 
raybiesCommented:
Question answered.
0
 
raybiesCommented:
Vee_Mod:

ID:24024495 answered the question.
ID:24024645 elaborated on the answer.
ID:24024837 elaborated on the answer.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

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