Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > controls are all null at page_load()

Reply
Thread Tools

controls are all null at page_load()

 
 
=?Utf-8?B?a2V2aW4=?=
Guest
Posts: n/a
 
      07-30-2007
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...
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-31-2007
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" <> wrote in message
news:6E9C9DB2-EB0E-490F-928F-...
> 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...



 
Reply With Quote
 
 
 
 
=?Utf-8?B?a2V2aW4=?=
Guest
Posts: n/a
 
      07-31-2007
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" <> wrote in message
> news:6E9C9DB2-EB0E-490F-928F-...
> > 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...

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
createImage sometime returns null and sometime returns non-null. vizlab Java 3 10-17-2007 11:21 AM
"stringObj == null" vs "stringObj.equals(null)", for null check?? qazmlp1209@rediffmail.com Java 5 03-29-2006 10:37 PM
difference between null object and null string gokul.b@gmail.com Java 16 10-12-2005 06:43 PM
VB.NET Null to SQL Null (ASP.NET 2.0 GridView) Kivak Wolf ASP .Net 2 06-28-2005 02:01 PM
Is there a null ostream (like /dev/null) in cpp? Bo Peng C++ 13 07-18-2004 07:17 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57