I'm not sure how you can process a request if the browser is closed. You
perhaps explicitely called Session.Abandon ???
Some more details about the context could help. What are yoou doing before
being at this point ?
--
Patrice
<Gouri.Mahajan7@gmail.com> a écrit dans le message de groupe de discussion :
0d6b83a9-e3ec-4d9a-b832-a9703dc08005@i36g2000prf.googlegroups.com...
> I'm not sure how you can process a request if the browser is closed. You
> perhaps explicitely called Session.Abandon ???
[quoted text clipped - 24 lines]
>
> - Show quoted text -
Actually I am loading the user control on the browser and passing the
session Id of the page as the parameter to the user control. When
disconnect button on my web page is clicked I am calling
session.abandon method and closing the browser using java script.
After that the control is passed to the line which I have mentioned
earlier (During execution) in that case the session is no more
exists. So I am getting an error to that line. Can you please tell me
how to handle that error not to occur.
Thanks.
Patrice - 22 May 2008 11:12 GMT
> Actually I am loading the user control on the browser and passing the
> session Id of the page as the parameter to the user control. When
[quoted text clipped - 4 lines]
> exists. So I am getting an error to that line. Can you please tell me
> how to handle that error not to occur.
Do you really need to get at this line ? If yes, you could just have a fflag
to know the user asked for abandon but do the call at the very last steps in
your code. Anotehr optino if you don"t know to get at this line would be to
stop the request right after the abandon (request.end) or have a special
page handling this rather than trying to do that in a page that sometimes
requires a session.
Also I'm surprised closing the browser using javascript works. It should at
least ask a question to the user. Finally it could be not that a smart
optino (for example one could close the session and use the window for
something else...)
---
Patrice.
Mark Rae [MVP] - 22 May 2008 11:50 GMT
> Also I'm surprised closing the browser using JavaScript works. It should
> at least ask a question to the user.
Not if you include
window.opener=null;
before
window.close();

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Gouri.Mahajan7@gmail.com - 22 May 2008 12:40 GMT
> > Also I'm surprised closing the browser using JavaScript works. It should
> > at least ask a question to the user.
[quoted text clipped - 10 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net
Hello,
Still it is giving an error. Can you please tell me other otions.
Mark Rae [MVP] - 22 May 2008 12:46 GMT
>>> Also I'm surprised closing the browser using JavaScript works. It should
>>> at least ask a question to the user.
[quoted text clipped - 8 lines]
>
> Still it is giving an error. Can you please tell me other otions.
The above will not fix your Session problem - it is designed to prevent a
browser asking for confirmation of closing...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Juan T. Llibre - 22 May 2008 14:24 GMT
re:
!> When disconnect button on my web page is clicked I am calling
!> session.abandon method and closing the browser using java script.
!> After that the control is passed to the line which I have mentioned
!> earlier (During execution) in that case the session is no more
!> exists. So I am getting an error to that line. Can you please tell me
!> how to handle that error not to occur.
You will have to execute that line before calling Session.Abandon.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
On May 22, 1:43 pm, "Patrice" <http://www.chez.com/scribe/> wrote:
> I'm not sure how you can process a request if the browser is closed. You
> perhaps explicitely called Session.Abandon ???
[quoted text clipped - 24 lines]
>
> - Show quoted text -
Actually I am loading the user control on the browser and passing the
session Id of the page as the parameter to the user control. When
disconnect button on my web page is clicked I am calling
session.abandon method and closing the browser using java script.
After that the control is passed to the line which I have mentioned
earlier (During execution) in that case the session is no more
exists. So I am getting an error to that line. Can you please tell me
how to handle that error not to occur.
Thanks.