我在ASP.Net 2.0应用程序中工作。在一个页面中,我有一个按钮。点击按钮,我在两个函数下面调用。 OpenPopup函数将在弹出窗口中打开url,RedirectToApp函数将当前页面重定向到hoomepage。但它正在打开有错误的主页并自动重定向到登录页面。如果我评论OpenPopup函数,它工作正常。我认为OpenPopup功能正在清除我用于主页的cookie。请指导我解决这个问题。
private void OpenPopup(url){
string s="window.open('" + url + "', 'popup_window', 'width=900,height=800,scrollbars,resizable');";
ClientScript.RegisterStartupScript(this.GetType(), "script", s, true);
}
private void RedirectToApp(string url){
string s = @"<script language='javascript'>
window.location.replace('"+url + @"');
</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "mfRedirectScript", s);
}