Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

Hidden Panel Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john pryor - 02 Aug 2007 22:02 GMT
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!!!
Signature

John Pryor

Eliyahu Goldin - 03 Aug 2007 07:21 GMT
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.

Signature

Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin

> 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
[quoted text clipped - 10 lines]
> after making a panel visible after it was hidden initially? Any help is
> greatly appreciated!!!
john pryor - 03 Aug 2007 16:14 GMT
Thanks, that was a lot of help! Everything is working as expected now.
Signature

John Pryor

> John,
>
[quoted text clipped - 19 lines]
> > after making a panel visible after it was hidden initially? Any help is
> > greatly appreciated!!!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.