Re: session object: simple question
From: Thomas Dodds (thomasdodds_at_hotmail.com)
Date: 08/31/04
- Next message: Scott Allen: "Re: Find Control in a nested DataGrid"
- Previous message: Thomas Dodds: "Re: Automating Outlook 2000"
- In reply to: Nikhil Patel: "session object: simple question"
- Next in thread: Patrice: "Re: session object: simple question"
- Reply: Patrice: "Re: session object: simple question"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 31 Aug 2004 10:33:07 -0400
int iProposalId = Session["ProposalId"];
you could then test: IsNothing(iProposalId)
"Nikhil Patel" <nikhil0100@aol.com> wrote in message news:uObhIV2jEHA.2948@TK2MSFTNGP11.phx.gbl...
> Hi all,
> I am using a Session object in my ASP.Net application to store a value of
> a Database field. I can access it as ...
> int iProposalId = Session["ProposalId"];
>
> The session timeout is set to 20. Now my question is if the session expires,
> would the above statement produce any exception? If I can't find the
> ProposalId value in the session object, I would like to display a message to
> the user and close the window.
>
> Thanks.
> -Nikhil
>
>
- Next message: Scott Allen: "Re: Find Control in a nested DataGrid"
- Previous message: Thomas Dodds: "Re: Automating Outlook 2000"
- In reply to: Nikhil Patel: "session object: simple question"
- Next in thread: Patrice: "Re: session object: simple question"
- Reply: Patrice: "Re: session object: simple question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|