How to Pass Panel visibility property to other page?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
Back
Top