Pages

Monday 13 August 2012

How to find a control present inside a Parent Page from another Child Page(Opened in popup) in Asp.Net?

        Suppose we have a page(Page1.aspx) from which we are opening another page as popup(Page2.aspx). Let say the parent page has a textbox(TextBox1) inside it and we are trying to add value to it. Then we have add these following JavaScript lines into your Child Page(Page2.aspx).
<script type="text/javascript">
function LoadParentText() {
            var TextBox = window.opener.document.getElementById(TextBox1');
            TextBox.Value=’Your Value’;
        };
</script>




Regards,
Prajanuranjan....


No comments:

Post a Comment

Total Pageviews