Click here to Skip to main content
14,538,925 members
Rate this:
Please Sign up or sign in to vote.
I have tried i frames, but it was not helpful as it fetch the whole website not a particular section.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

There is no easy way of doing this as the html on that site will probably rely on css on that site also. If you take a section of the html and inject it into your page then it probably won't look the same as you don't have the supporting css. The target site will need to support some mechanism whereby it will return to you just the bit you are interested in (so you can use an iframe), or you will need to ensure your css supports their html, so there is no real way of doing this without changes to the target site to make it easier.
Member 11752343 9-Jun-15 6:24am
how to use a iframe? Can you please refer me an example so that i can easily understand.
How can i fetch the only data I want. Please help me with this. thnx in advance
F-ES Sitecore 9-Jun-15 6:47am
You can't use an iframe to show part of a page unless the site you are trying to access implements something that lets your site do this.
Member 11752343 9-Jun-15 7:07am
so how can i fetch? what can i use? please tell me. If i frames can't be use then what should i do.
F-ES Sitecore 9-Jun-15 7:11am
You need to change the site you are linking to so that you can agree some kind of url structure for rendering only part of the page, like "http://server/page.aspx?section=abc" means that page.aspx only renders the "abc" section of its page rather than the whole page. You then make your iframe src point to that url and only the "abc" section will appear.
Member 11752343 9-Jun-15 7:10am
so how can i fetch the data. there must be a solution for this which i can't figure out. Please tell me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100