Generating page by using javascript creates a new session

I don’t know if this is the right category, but I’m sure someone will tell me, if not.
I am using the following to open a page in a web application I’m working with:

Script:=’’

Page.ClientScript.RegisterStartupScript( typeof(Page), ‘Inv’, script);

As you might figure, mMenu is a menu Component and the substrings of the selected value are input parameters to “window.open(…)”.

I’ve used this method to open pages many times before, and as far as I can recall, it has never before happened that this generates a completely new session. I.e. all the session parameters are forgotten, and in fact “session.IsNewSession.ToString” sends back “True” when asked. The result is that calling a session variable down the line generates a System.NullReferenceException.
It does not happen during debugging on my own machine, only when run on the production server. The server seems to be running .NET Framework v2, asp.net v2, as is my own machine.

Do any of you have an idea what this might be due to? Any help appreciated.

brgds,
Janne

Sorry guys, I accidentally copied in some characters that shouldnt be there. With the tags replaced by [], he script string goes like this,:

[script language=“javascript”] var wdw=window.open(“InvRates.aspx”,“InvWndw”,“scrollbars=yes,resizable=yes,width=1050,height=750”); wdw.focus();[/script]

Wrong again. It goeslike this:

[script language=“javascript”]’ ‘var wdw=window.open("List.aspx?Table=Projects&Find=’+mMenu.SelectedValue.Substring(5,mMenu.SelectedValue.Length-5)+
’","’+mMenu.SelectedValue+'wndw",“scrollbars=yes,resizable=yes,width=1000,height=500”); wdw.focus();[/script]

Hello Janne,

I tried to search same problem and found next topic:


Seems it is normal the new session is started when the new window is opened.
Does that code worked for you with previous Oxygene version and stopped after installing latest build?

Best regards.

Well, to tell you the truth I’m not sure when this particular window stopped working. All other windows work, the application uses multiple windows for certain purposes, and I’ve used this method to open windows in it for several years without any problem until now. As I said it doesn’t happen during debugging on my own machine, only upon deployment. Or actually, I don’t even know if it was upon a deployment or if it just stopped working. It happens on the production server only. Can’t say I particularly enjoy it.
brgds,

And yes, I saw that one too, but haven’t managed to find a reasonable way to implement anything of what was written there, not yet anyway. I also read somewhere (can’t find it now) that there is only so many session variables you can store, and that when you exceed that number, a new session will be created. Ever heard of this? Can’t see why that behavior would be desirable, but if it’s true then that can well be the explanation in my case, because I sure have quite a number of them.
best,