How can I open a new window in a asp page with a new session?

I want to open a new window from the original asp page with a new session? How can I do it? Is it possible? I have tried the method, window.open(), of vbscript and javascript, but they all didn't work. The new window is in the same session as the original one. Please help me. Thanks!

Comments

  • : I want to open a new window from the original asp page with a new session? How can I do it? Is it possible? I have tried the method, window.open(), of vbscript and javascript, but they all didn't work. The new window is in the same session as the original one. Please help me. Thanks!


    Since session state is maintained by storing a per-session cookie on the users machine, you could try erasing that cookie in the new window. I'm not sure what, if any, effect this will have on the session in the old window though. I have a feeling it'll probably also kill the original session :(
  • : Since session state is maintained by storing a per-session cookie on the users machine, you could try erasing that cookie in the new window. I'm not sure what, if any, effect this will have on the session in the old window though. I have a feeling it'll probably also kill the original session :(
    :

    That's the puzzle I am getting in. I have to retain the old session, because I store several important mapx objects in it for later, which I use to draw a map in the browser, while I need a new session to store some new ones. The two browsers can't use the same session or to share the same mapx objects, otherwise they will draw the features which should be separated in one map. Have I make it clear?
  • : : Since session state is maintained by storing a per-session cookie on the users machine, you could try erasing that cookie in the new window. I'm not sure what, if any, effect this will have on the session in the old window though. I have a feeling it'll probably also kill the original session :(
    : :
    :
    : That's the puzzle I am getting in. I have to retain the old session, because I store several important mapx objects in it for later, which I use to draw a map in the browser, while I need a new session to store some new ones. The two browsers can't use the same session or to share the same mapx objects, otherwise they will draw the features which should be separated in one map. Have I make it clear?


    If your hunt for a way to have two unique session fails, your alternative may be to use one session with uniquely named session variables. For example, you could try doing:

    MyVariable = Session("MapX" & Request.QueryString("ID"))

    In the main page, Request.QueryString("ID") is going to be nothing, and so it will read Session("MapX")

    When you open the new window, pass it some ID value, so for example if you pass it the number 100, it'll use Session("MapX100")

    If you're going to have more than 2 windows open, you'll probably also want another session variable that keeps track of which ID numbers you've used, so you don't duplicate any when opening a new window.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories