473,473 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to Pass Panel visibility property to other page?

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

May 29 '06 #1
3 1863
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

May 29 '06 #2
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
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"velu" <ve**@discussions.microsoft.com> escreveu na mensagem
news:CD**********************************@microsof t.com...
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

May 29 '06 #3
thank you Bruno Alexandre & Marcel..

much appericated..

May 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jukka K. Korpela | last post by:
I have noticed that the meaning of visibility: collapse has been discussed on different forums, but with no consensus on what it really means. Besides, implementations differ. The specification...
2
by: Lokhan Wong | last post by:
My question is whether it's possible to change the properties of a panel, that resides on the webform containing the usercontrol, in the usercontrol itself. Like this: <form> <asp:panel...
1
by: John | last post by:
I have a panel on a webpage. I use client Javacript to manipulate its visibility using something like: Panel.style.display = 'none'. During a postback, getting the Visible attribute always...
2
by: Mark Rae | last post by:
Hi, Is there any way to use the asp:Panel Web control so that it is always created regardless of its Visible property? E.g. if I write the following: <asp:Panel ID=pnlEvent Runat=server...
4
by: dw | last post by:
Hello, all. I'm using a Panel to display the values the user entered into a form upon validation. The panel is mainPanel and its visibility is set to False server-side until the IsValid returns...
9
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected......
4
by: tshad | last post by:
I am trying to hide and show certain parts of my code (which I have no problem doing with DW). In VS 2003, it won't let you use <div runat="server"to section of parts of my code in a table. This...
3
by: Jens-Oliver Murer | last post by:
Hello, I have a problem with an ASP.Net-application which generates very large source codes which have to be sent to the clients through 'thin' lines. The main problem seems to be a Datagrid...
4
hemantbasva
by: hemantbasva | last post by:
We have designed an aspx page having five ajax tab in it. the data of first four are designed on page whereas for the fifth tab it renders a user control named MYDOMAIN. in the tab container's even...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.