lmf232s
06-20-2006, 02:10 PM
This code will not work
Dim PanelId as String = "Panel1"
Dim P As Panel
P = FindControl(PanelId)
If Not P Is Nothing Then
P.Visible = True
End If
This code will work
Me.Panel1.Visible = True
All i can add is that the site uses a namespace and some page template thing that ends up rendering all the id's of the elements like this:
_PageTemplate_innerHolder_Panel1
I dont think this should matter since im trying to access in the code behind file. I know that if i want to access the panel through javascript i have to refer to
w/ the entire name _PageTemplate_innerHolder_Panel1.
EDIT
Actually this problem might be related to all the crap i have to include on the page because of the namespace and the damn custom templates.
If i just create a blank page w/ none of that crap on it, then the code i posted works just fine.
Any ideas on what i could be missing to allow this code to work when i have to include all the page template crap?
Any ideas
Dim PanelId as String = "Panel1"
Dim P As Panel
P = FindControl(PanelId)
If Not P Is Nothing Then
P.Visible = True
End If
This code will work
Me.Panel1.Visible = True
All i can add is that the site uses a namespace and some page template thing that ends up rendering all the id's of the elements like this:
_PageTemplate_innerHolder_Panel1
I dont think this should matter since im trying to access in the code behind file. I know that if i want to access the panel through javascript i have to refer to
w/ the entire name _PageTemplate_innerHolder_Panel1.
EDIT
Actually this problem might be related to all the crap i have to include on the page because of the namespace and the damn custom templates.
If i just create a blank page w/ none of that crap on it, then the code i posted works just fine.
Any ideas on what i could be missing to allow this code to work when i have to include all the page template crap?
Any ideas