473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

controls are all null at page_load()

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

--
kevin...
Jul 30 '07 #1
2 3716
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" <ke***@discussions.microsoft.comwrote in message
news:6E**********************************@microsof t.com...
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

--
kevin...

Jul 31 '07 #2
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" wrote:
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" <ke***@discussions.microsoft.comwrote in message
news:6E**********************************@microsof t.com...
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

--
kevin...


Jul 31 '07 #3

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

Similar topics

3
by: Steve Drake | last post by:
All, I have a CONTROL that contains 1 control (Control ONE), the 1 control that it can contain 1 or 2 control (Control A and B). Control A, raises and event and Control ONE receives this event...
4
by: Bas Groeneveld | last post by:
I am developing an ASP.NET application part of which consists of a data entry wizard defined by entries in a data table - ie the controls on each page of the wizard are determined by definitions in...
3
by: Peter Young | last post by:
If I inherit from a custom base page, it seems that the controls on the base page are unavailable. e.g. public class basePage : System.Web.UI.Page { protected...
7
by: John | last post by:
Hi all, I need finality on this once and for all please. I have a main page which contains a couple of placeholders and within these placeholders, depending on what the user presses, I load...
3
by: Ankit Aneja | last post by:
I have a strange situation and I have no idea how to solve this. Its a Recruitment Search Page,in the Admin Page, for every button click event the Admin Person has to create a checkbox on the users...
2
by: kens | last post by:
I've found some odd behavior in dynamically loaded user controls under ASP.NET 2.0. Specifically, if I load a control dynamically, in the "Page_Load" event, the code-behind for the user control is...
0
by: Mike Collins | last post by:
I someone can please help, I am about at an end in trying to figure this out. I am adding some dynamic controls to my page (I found out that I was supposed to be doing that in the oninit event,...
4
by: Rob Meade | last post by:
Hi all, I played with my first bit of AJAX the other week and was pleasantly surprised that I achieved my goal..now I'd like to try something else.. Question... If I have an updatePanel,...
15
by: Ofer Zelig | last post by:
I'll describe the simplest situation of the problem. I have a simple Web User Control which only contains a: <div id="bla" runat="server" /. I dynamically add it to a page, by performing: ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.