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 / July 2007

Tip: Looking for answers? Try searching our database.

controls are all null at page_load()

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kevin - 31 Jul 2007 00:36 GMT
using VS2005

My masterpage has two panels and two hyperlinks.  The initial content aspx
page is blank.

The page_load event of the masterpage hides one of the panels based on
SESSION variables.

When I press one particular link all controls are null, thus throwing an
error.  The other hyperlink behaves normally.

The hyperlinks are both declarative with the url being hardcoded.

Any ideas about where I should be looking?

Thanks

Signature

kevin...

Eliyahu Goldin - 31 Jul 2007 08:16 GMT
Two ideas:

1. If you hide controls with Visible=false, they won't come back in
postbacks.

2. If you add controls dynamically, you need to do it on each postback.

Signature

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

> using VS2005
>
[quoted text clipped - 12 lines]
>
> Thanks
kevin - 31 Jul 2007 16:36 GMT
you got me to thinking....

I had an UpdatePanel (AJAX) on the masterpage with the ContentPane inside of
it.  I remoed it and put an UpdatePanels on each of the content pages and my
problems are gone
Signature

kevin...

> Two ideas:
>
[quoted text clipped - 19 lines]
> >
> > Thanks

Rate this thread:







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.