0

I am trying to load an external site (local iis), into a div from a main site (local iis). Say for example this is the external site: 'https://www.ExternalSite.com/'

Simply browse to the external site, which is MVC Asp, does not work because the view needs parameters. There has been a redirection attached from the main site, which gets the parameters and redirects to the external site. Now I do not want the main site to be left and redirected to the external site, I have build a modal dialog, which needs to display the view of the external site.

If I perform:

var redirectionUrl = '/redirect.aspx/<parameters>';
$('#ModalBody').load(url);

It loads the redirection form, which I should submit to get the external page.

$('#redirectionform').submit();

However this redirects the entire browser.

Is there a way to perform the redirect and show the contents of the redirected page content into the modal div?

JKerny
  • 488
  • 1
  • 3
  • 19
Revils
  • 1,478
  • 1
  • 14
  • 31
  • [possible duplicate](http://stackoverflow.com/questions/18145273/how-to-load-an-external-webpage-into-a-div-of-a-html-page) – Manish Goswami Aug 11 '16 at 06:38

1 Answers1

1

You can load an external site in the main site by using 'iframe'. like below.

<div>
    <iframe src = "https://www.ExternalSite.com/" width = "100%" height="1000" frameBorder="0"></iframe>
</div>

The external site will load inside the iv only.
hope this helps

anand
  • 1,559
  • 5
  • 21
  • 45