controls are all null at page_load()

G

Guest

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
 
E

Eliyahu Goldin

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.
 
G

Guest

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
--
kevin...


Eliyahu Goldin said:
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.

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


kevin said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top