Draven Chen Zhen
Apr 5th, 2005, 01:39 AM
I want to redirect an iframe (is called "main") in my page by useing a linkbutton in asp.net
When I click on the linkbutton the fuction test is called
private void test(object sender, System.EventArgs e)
{
Response.Write("<script>window.parent.main.location = 'http://google.be'</script>");
}
I also tryed
Response.Write("<script>_parent.location.replace('http://google.be')</script>");
Response.Write("<script>window.frames[“main”].location.replace('http://google.be')</script>");
Response.Write("<script>window.frames[“main”].location.href='http://google.be'</script>");
But non of the scripts seem to work :ehh:
When I click on the linkbutton the fuction test is called
private void test(object sender, System.EventArgs e)
{
Response.Write("<script>window.parent.main.location = 'http://google.be'</script>");
}
I also tryed
Response.Write("<script>_parent.location.replace('http://google.be')</script>");
Response.Write("<script>window.frames[“main”].location.replace('http://google.be')</script>");
Response.Write("<script>window.frames[“main”].location.href='http://google.be'</script>");
But non of the scripts seem to work :ehh: