473,765 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hidden Panel Problem

I have a aspx web page with several hidden(visible= false) panels on it.
Depending on the task the user is going to perform I show or hide the
appropriate panel. What I'm discovering is that my controls on the panels are
not firing their events if the panel was initially hidden when the page
loaded.

For instance, i have a panel with a button and a 'onclick' event defined.
The onclick will only work if the panel is intially visible when the page
loads but not if the panel was hidden when the page loaded. I also noticed
this with my drop down list not loading list items either.

Is this behavior by design? If so what should I do to get the events to fire
after making a panel visible after it was hidden initially? Any help is
greatly appreciated!!!
--
John Pryor
Aug 2 '07 #1
2 2340
John,

Yes, it is by design. Server controls with Visible=false don't render to the
client and, consequentially , don't come back in postbacks.

Leave Visible=true and hide the panels with css rule display:none.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"john pryor" <jo*******@disc ussions.microso ft.comwrote in message
news:50******** *************** ***********@mic rosoft.com...
I have a aspx web page with several hidden(visible= false) panels on it.
Depending on the task the user is going to perform I show or hide the
appropriate panel. What I'm discovering is that my controls on the panels
are
not firing their events if the panel was initially hidden when the page
loaded.

For instance, i have a panel with a button and a 'onclick' event defined.
The onclick will only work if the panel is intially visible when the page
loads but not if the panel was hidden when the page loaded. I also noticed
this with my drop down list not loading list items either.

Is this behavior by design? If so what should I do to get the events to
fire
after making a panel visible after it was hidden initially? Any help is
greatly appreciated!!!
--
John Pryor

Aug 3 '07 #2
Thanks, that was a lot of help! Everything is working as expected now.
--
John Pryor
"Eliyahu Goldin" wrote:
John,

Yes, it is by design. Server controls with Visible=false don't render to the
client and, consequentially , don't come back in postbacks.

Leave Visible=true and hide the panels with css rule display:none.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"john pryor" <jo*******@disc ussions.microso ft.comwrote in message
news:50******** *************** ***********@mic rosoft.com...
I have a aspx web page with several hidden(visible= false) panels on it.
Depending on the task the user is going to perform I show or hide the
appropriate panel. What I'm discovering is that my controls on the panels
are
not firing their events if the panel was initially hidden when the page
loaded.

For instance, i have a panel with a button and a 'onclick' event defined.
The onclick will only work if the panel is intially visible when the page
loads but not if the panel was hidden when the page loaded. I also noticed
this with my drop down list not loading list items either.

Is this behavior by design? If so what should I do to get the events to
fire
after making a panel visible after it was hidden initially? Any help is
greatly appreciated!!!
--
John Pryor


Aug 3 '07 #3

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

Similar topics

0
2735
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there anyway to stop this...??? <HTML> <HEAD> <title>Conform Inbox</title> <meta content="False" name="vs_snapToGrid">
3
1611
by: Sam Sungshik Kong | last post by:
Hello! While using panel control, I wondered a thing. Panel class is subclass of Control class. Control class has KeyPress event and Focus() method, etc... Then Panel class must have them. I guess it *has* then behind even if they are not meaningful. However, the code complete tool doesn't show them when I type panel1.(code complete list). Actually I can type panel1.Focus() without any compilation error.
0
1083
by: George Ter-Saakov | last post by:
I have a composite control. Which has 2 parts. Under some conditions first part must be shown sometimes another. So naturally I used 2 Panel object. And hide one of them. The problem is that hidden Panel object renders itself as <br>. Not sure what is the purpose of it. But it ads extra line which is not acceptable. Is there another control which when hidden is HIDDEN and does not render anything.
9
3187
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... So the behavour is similar to a tab control. The user is expected to fill out required data on each of the panels before pressing a submit button which is visible from all panels. Problem I have is validating the data entered by the user. I...
2
2170
by: Peteroid | last post by:
When the application I'm working on is run it creates a panel with a Paint event customized to draw primitives (circles, rectangles, etc.), places the panel on a form, and then launches the form. The weird part is, the panel, in the instant it becomes visible, seems to have an image of what this panel had in it the LAST TIME THE APPLICATION WAS RUN! Since this panel is created anew every time the application is run ('natch), this seems...
11
11270
by: dongarbage | last post by:
Hi there, I'm very much a C# novice. How do you do freehand drawing on a panel with a mouse in c#? Thanks, Don
4
3113
by: tomko | last post by:
Hi, I've found a way to copy the visible presentation of a control on to a picturebox (using Graphics and GDI). But this works only if the control is visible. How can I have the control hidden and still retreive the graphics of the control (have the control draw itself for me)? And what makes a child control hide itself when its parent is hidden? Br,
7
2947
by: tshad | last post by:
How do you hide an asp.net object and still be able to access it? I had my email in a session variable, but you can't access the session variable from Javascript (I don't think - since Javascript is Client and Session is Server). I tried using the email that was on the page, but it was surrounded by a Panel that had its visible property set to false - so anything inside of the Panel was not on the page.
4
18727
by: vann | last post by:
Hello, Is there a way to scroll inside a Panel but with the scroll bar hidden? hmm.. let me explain. I have a Panel that contains buttons. These buttons are created programatically depending on the information gathered from a Database. Some buttons may be outside the range of view if there are a lot of records. I want the user to be able to scroll down when he clicks a Button which is created outside the Panel and has nothing to do with...
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9399
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9957
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5276
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3924
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 we have to send another system
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.