Return user to original view

G

Guest

Hello -

There is a possibility of having Panel1 displayed, Panel1 and Panel 2
displayed or Panel1, Panel2 and Panel3 displayed.

When a user clicks on a Button, those Panels, if visible, are set to false.
Another panel, Panel4, is opened. There is a close button on Panel4 if a
user changes their mind.

I need this program to remember which panels were opened in the beginning,
to return the user to where they were if they click the "Close" button.
What's the best way of doing that?
 
G

Guest

Hey Sandy,

Perhaps you could store the informaiton in session variables. That way the
user can go wherever on the site within the same session, and when they
return you can use the session variables to open the relevant panels based on
what is in the session variables.

- B
 
G

Guest

Well when a user opens the fourth panel, before you hide each of the other
ones, store thier visible properties in a session variable, which is done
like this in VB.NET:

'Store visible properties for Panel1, Panel2 and Panel3
Session.Item("Panel1Open") = Panel1.Visible
Session.Item("Panel2Open") = Panel2.Visible
Session.Item("Panel3Open") = Panel3.Visible

This will create the session variables if they do not exist. So if you add
that code before hiding the open panels and opening the fourth, you will have
thier state stored in sesion. Then all you need to do to you code for the
cancel button on panel 4 (To return the user to the three panels they were
looking at) would be something like this.

'Restore visible properties for Panel1, Panel2 and Panel3
Panel1.Visible = Session.Item("Panel1Open")
Panel2.Visible = Session.Item("Panel2Open")
Panel3.Visible = Session.Item("Panel3Open")

This will then only show the panels which were open before the fourth was
open.

- B
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top