Hi, do you have special need for iframe? Best way is to load a page a display a popup.
Below is the way
Page1.aspx
<input id="Button1" type="button" value="button" />
<div id="popupdiv" style="display:none;" />
<script type="text/javascript" language="javascript">
$("#Button1").click(function () {
$.ajax({
type: 'GET',
dataType: 'text',
url: '/HelloWorld/Page2',
success: function (data) {
$('#popupdiv').html(data);
$("#popupdiv").dialog({
width: 400,
height: 200,
modal: true
});
}
});
});
function abc() {
alert("one");
}
</script>
Page2.aspx
<script type="text/javascript" language="javascript">
$(function () {
$('#btnclick').click(function () {
abcd();
});
function abcd() {
abc();
}
})
</script>
<input type="button" id ="btnclick" name="Click"/>
In the calling ajax method just return your aspx page as text