I have two static pages from a user which is deployed on their servers. Currently I am making a call to their server from code behind and loading them. But now I don't want to make a code behind call. Instead I would like to load those static pages in an iframe. Links(URL's) to those static pages is stored in my web.config. using C# during init call I am copying those URL's in hidden fields and assigning them to src of iframe like below:
<script>
var bLoaded = false;
function LoadIframe1() {
if (!bLoaded) {
var iframe1 = document.getElemetById('iframe1');
if (typeof (iframe1) != 'undefined' && iframe1 != null) {
iframe1.src = hiddenfield.value;
bLoaded = true;
}
}
}
</script>
<iframe id="iframe1" onload="Loadframe1();" />
Now the problem is if the files are within directory of the project, it is working fine. but how can I load the files that are not in the solution directory?