I have three pages, two .aspx page and one .ascx page in parent child relationship. Page1.aspx->Page2.aspx->page3.aspx
Page1.aspx contains iframe inside div:
<script type="text/javascript">
$(document).ready(function () {
var getQueryString = function (field, url) {
var href = url ? url : window.location.href;
var reg = new RegExp('[?&]' + field + '=([^&#]*)', 'i');
var string = reg.exec(href);
return string ? string[1] : null;
};
var consoletype = getQueryString('ConsoleType');
var role = getQueryString('role');
var url = "/_layouts/Page2.aspx?Type=" + consoletype + "&role=" + role;
$("#load").attr("src", url);
});
</script>
<div id="loader" class="loading">
Processing
<img id="imgloader" src="../../_layouts/images/loadr.gif"
style="display: none" alt="" />
<iframe id="load" src="" width="1000px" height="400"></iframe>
</div>
Then in Page2.aspx i am registering .ascx page:
<%@ Register TagPrefix="Import" TagName="Import" Src="~/_controltemp/Page3.ascx" %>
Then in Page3.ascx i have my actual code. From this page i need to access the div present in Page1.aspx.
I need to achive this with javascript or with c# code. Note: These are all sharepoint application pages.
Please suggest the way to achieve this.