ASP.NET中新窗口的新会话 [英] New Session for New window in ASP.NET

查看:361
本文介绍了ASP.NET中新窗口的新会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个ASP.NET应用程序中,我们提供了一个链接来打开另一个应用程序.如果用户单击该超链接,则另一个应用程序将在新窗口中打开.问题是两个应用程序都使用相同的会话.有什么方法可以更改新窗口的会话ID?

In one ASP.NET application, we provide a link to open another application. If user clicks on that hyper link, another application will open in new window. The problem is both the applications are using the same session. Is there any way to change the session ID for the new window?

我已经尝试在页面加载中放弃会话并清除sessionID cookie.但是它正在创建新的会话ID,并且两个窗口再次都在访问新的会话ID.我想为两个窗口使用单独的会话ID.

I have already tried abandoning session and clearing sessionID cookie in page load. But it is creating new session id and again both window are accessing the new Session ID. I want to have separate session ID for the two windows.

有什么办法吗?

推荐答案

在使用Session时,我认为没有很好的方法可以做到这一点.对于不想在两个窗口之间共享的数据,您可能要考虑使用Viewstate而不是会话.

I don't think that there is a good way to do this when you are using Session. You may want to think about using Viewstate instead of session for the data that you do not want shared between the two windows.

这篇关于ASP.NET中新窗口的新会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆