Redirect parent window from iFrame
I have an asp.net page inside an iFrame. I want to redirect the parent page (that sits outside the iFrame) when an 开发者_如何学Pythonasp.net button on the asp.net page in the iFrame is clicked.
The asp.net button will need to do some processing before re-directing, so I guess I need to call javascript from the asp.net
just create simple ans: in javascript
<script type="text/javascript">
function NewWindow() {
document.forms[0].target = "_top";
}
</script>
call it any control like button
<asp:LinkButton ID="linkbutton1" Text="Enroll Now" OnClientClick="NewWindow();" runat="server" onclick="enrol_Click"/>
精彩评论