A group of "If" statements

B

bthumber

I have a group of four if statements. The user chooses which session on a
different page by making choices. The functionally is, if the user choose a
session the program give the user a different set of pages to work with. The
problem I run into is if the user made choices to get Session["d"] then later
want to choose session's a, b, or c the program is stuck on Session["d"]. I
tried a switch but that cause me more issue than already had. Is there a way
to get around this problem. Session.Abondon, Clear and remove() caused error
because there are session at the start of the program.
if(Session["a"] != null)
do something;
if(Session["b"] != null)
do something;
if(Session["c"] != null)
do something;
if(Session["d"] != null)
do something;
 
B

bthumber

Mark Rae said:
Assuming that we're talking about ASP.NET here, then it's not possible to
"select" a new session. There is no concept whatsoever of multiple sessions
per user. Each user has one session at any one time.

It's possible, of course, to tear down a session which will cause a new
session to be created. However, the user has no choice at all in the
matter...
The truth is I trying to find a better way to accomplish my goal, at present
the program works as long as the user doesn't choose the last one, so I'll go
over to the ASP.net group. Thanks.
 
G

Göran Andersson

bthumber said:
The truth is I trying to find a better way to accomplish my goal, at present
the program works as long as the user doesn't choose the last one, so I'll go
over to the ASP.net group. Thanks.

See you there. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top