2.0 beta 2: Disappearing Controls

C

clintonG

Hello Fellow Masochists ;-)

In the MasterPage I've used a control (LinkButton1) in the 'header' region
to function as a tab that displays another control (LinkButton2).
LinkButton2 is located within a panel (Panel1) and I control the display of
LinkButton2 by modifying the Panel1.Visibile property.

When LinkButton2 is clicked it loads content as expected but LinkButton2
disappears after its click event is raised and the page is posted back to
get and load the content page into the MasterPage ContentPlaceHolder.

LinkButton2 appears in the Trace control tree and when displayed by the
LinkButton1 click event LinkButton2 has Render Size and View State size
values. When LinkButton2 is clicked to load the content page LinkButton2
disappears from the HTML source, it is not displayed by the UI and its
Render Size and View State values are zeroed out of the Trace control tree.

I've tried using the FindControl method and creating a Property both of
which will return values for the LinkButton2.ID and
LinkButton2.NamingContainer but I can not access or set
LinkButton2.Visibility or other properties because the control has somehow
disappeared. A similar behavior occurs with the SiteMapPath.

What could I be missing?

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 
J

JIMCO Software

clintonG said:
Hello Fellow Masochists ;-)

In the MasterPage I've used a control (LinkButton1) in the 'header'
region to function as a tab that displays another control
(LinkButton2). LinkButton2 is located within a panel (Panel1) and I
control the display of LinkButton2 by modifying the Panel1.Visibile
property.
When LinkButton2 is clicked it loads content as expected but
LinkButton2 disappears after its click event is raised and the page
is posted back to get and load the content page into the MasterPage
ContentPlaceHolder.
LinkButton2 appears in the Trace control tree and when displayed by
the LinkButton1 click event LinkButton2 has Render Size and View
State size values. When LinkButton2 is clicked to load the content
page LinkButton2 disappears from the HTML source, it is not displayed
by the UI and its Render Size and View State values are zeroed out of
the Trace control tree.
I've tried using the FindControl method and creating a Property both
of which will return values for the LinkButton2.ID and
LinkButton2.NamingContainer but I can not access or set
LinkButton2.Visibility or other properties because the control has
somehow disappeared. A similar behavior occurs with the SiteMapPath.

Without a repro, can't say. How is the LinkButton2 being added? In the
designer or dynamically? Sounds right off like the Panel is not visible any
longer, but as I say, can't say for sure without debugging.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
C

clintonG

Thanks for responding.

The link buttons and panel control are defined in the MasterPage.

I have no idea how to debug this runtime anomaly other than observation
using trace which is why I've posted seeking insight from others. What
debugging approach would you suggest?

<%= Clinton Gallagher
 
J

JIMCO Software

clintonG said:
Thanks for responding.

The link buttons and panel control are defined in the MasterPage.

I have no idea how to debug this runtime anomaly other than
observation using trace which is why I've posted seeking insight from
others. What debugging approach would you suggest?

I hesitate to offer any suggestions without knowing the details of the
implementation. I generally use Windbg for debugging such things because
it's more low-level than VS.NET. However, VS.NET 2005 makes it easier.

I'm running a much later build than beta 2. Have you tried this with the
August CTP? There were some bugs in the implementation of Master Pages in
beta 2 that were corrected shortly after it was made available.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
C

clintonG

No kidding? Bugs? I am shocked :)
I'll go check MSDN Feedback for any reported bugs in MasterPages. Where did
you learn of these bugs?

<%= Clinton Gallagher
 
J

JIMCO Software

clintonG said:
No kidding? Bugs? I am shocked :)
I'll go check MSDN Feedback for any reported bugs in MasterPages.

Good grief, Clinton. You're a developer. Surely you realize that there are
bugs in a beta product! :)

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
C

clintonG

But I am a burnout and the truth is I didn't even think of checking MSDN
Product Feedback although I have posted quite a few suggestions and reported
several bugs myself and I don't have a good grasp on referencing controls in
the MasterPage from content pages yet which is why I haven't been able to
debug this runtime anomaly yet. Once I can get or set properties on controls
in the MasterPage I'll be able to deduce why the LinkButton controls are
being removed from the ViewState yet remain in the control tree.

BTW -- I downloaded the August CTP tonight and then promptly sent it to the
Recycle Bin after learning Microsoft has announced a RC1 that they state
will be available this month.

<%= Clinton Gallagher
 
J

JIMCO Software

clintonG said:
But I am a burnout and the truth is I didn't even think of checking
MSDN Product Feedback although I have posted quite a few suggestions
and reported several bugs myself and I don't have a good grasp on
referencing controls in the MasterPage from content pages yet which
is why I haven't been able to debug this runtime anomaly yet. Once I
can get or set properties on controls in the MasterPage I'll be able
to deduce why the LinkButton controls are being removed from the
ViewState yet remain in the control tree.

I'd at least test it with the CTP release. It's considered RC0.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 

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

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top