How to Pass Panel visibility property to other page?

G

Guest

How to Pass Panel visibility property to other page?

I have a scenario here.

I have created a user control that has a button and panel visible set to
false. When I click the button

if the panel.visible = false then
panel.visiable = true
else panel.visiable = false
end if

I have placed the control in 2 web pages. In first page when I click the
button the control opens. Then when I go to second page the control is show
as closed as default so I again to need to click the button again to open it.

Is there any way to save the state of the panel to other pages?

Your help much appreciated.

Thx
JK
 
B

Bruno Alexandre

why not a session?

page A

if panel.visible = false then
panel.visible = true
session("showPanel") = true
else
panel.visible = false
session("showPanel") = false
end if

page B:

if not session("showPanel") then
panel.visible = true
else
panel.visible = false
end if
 
N

Nenefta

Hi JK,

it seems to me that you just need to use a Session variable. You have
two instances of the usercontrol on two different pages, so they will
not save state automatically. Use the session variable to initialize
the panel when the page loads.

Grtx,
Marcel
 

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,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top