Display an external website page in asp.net mvc 5

I am creating a site for a class project using ASP NET MVC 5 in which I need a section of a website to display a page from another website. The goal is to somehow insert this page into my opinion, so interaction with the user interface is still possible with the embedded page, as if the page was visited directly in the browser (the end effect is that the page is displayed and allows you to interact, but my website theme always stays around)

I know that one way to do this is to simply put it in an iframe in my view. But I want to know if there is another solution. My teacher suggested using partial views, but I cannot figure out how to achieve the same result. Can anyone suggest another way to achieve this? Also, what would be the right way to do this from a security point of view (I believe there is an iframe), but I want to know a different opinion?

Thank.

+4
source share
1 answer

I suggest you use an isolated IFrame, for example,

http://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/

<iframe sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
    src="https://blah.com/index.html"
    style="border: 0; width:130px; height:20px;">
</iframe>

You can configure how much energy the content in the Iframe has (i.e. run scripts).

, . , WebClient HTML -, HTML- . , script , , .

+4

Source: https://habr.com/ru/post/1538978/


All Articles