被你跳迷了。
加js判断:
string strScript=@"<script language=""javascript"">
if(window.opener)
{
if(window.opener.parent)
{
window.opener.parent.location.href='index.html';
window.close();
}
else
{
window.opener.location='/index.html';
//window.close();
}
}
else
{
window.location='/index.html';
//window.close();
}
</script>";
Page.RegisterStartupScript("ref",strScript);