I got a weird task to do.
I need to load a webpage inside an iframe. And whatever text I select within the iframe, I need to retrieve that from outside the iframe. I m not allowed to use javascript.
Is there any way to do that in asp.net c#?
I got a weird task to do. I need to load a webpage inside
Share
I agree it’s a weird task. I personally would avoid situations like this, however if this is what you have to do this is how I would approach it.
If you know the url to the page in the iframe, scrape that website, eg
Have a look at the Html Agility pack site and Example page for more info on how to use the library.
This will allow you to grab the text you need from the external site and display it on your own. Always important to check the legalities behind doing this as well and if the information you are looking to get off this site is allowed to be reproduced on other sites etc.
HTH.