caoimhincryan
asked on
call master page control
I have my master page control with a panel1 in it. Its property visible is set to false.
In one of my pages for example- Links.aspx I want to set the panel1 property visible = true in my master page.
Is this possible?
In one of my pages for example- Links.aspx I want to set the panel1 property visible = true in my master page.
Is this possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the quick response. Both work great but actually doesnt display for the context Im using it. Let me explain.
I have my panel in master page. Then on my links page i override the onError method so as to display my own error message.
Protected Overrides Sub OnError(ByVal e As System.EventArgs)
MyBase.OnError(e)
' 'do stuff here
UpdatePanel1.Visible = False
CType(Me.Form.Parent.FindC ontrol("Er rorHandler Panel"), Panel).Visible = True
Response.Write(Server.GetL astError() .Message)
Server.ClearError()
End Sub
To test this i have added Throw New ApplicationException("Blah h") on my page load event.
All thats displayed is "Blahh" . Would anyone know how to display my panel?
I have my panel in master page. Then on my links page i override the onError method so as to display my own error message.
Protected Overrides Sub OnError(ByVal e As System.EventArgs)
MyBase.OnError(e)
' 'do stuff here
UpdatePanel1.Visible = False
CType(Me.Form.Parent.FindC
Response.Write(Server.GetL
Server.ClearError()
End Sub
To test this i have added Throw New ApplicationException("Blah
All thats displayed is "Blahh" . Would anyone know how to display my panel?
ASKER
I never specified that my error message is in my panel on the master page hence why I want it to display.
ASKER
I split the points. I feel I need to ask a new question for my current issue.
MasterPage ms = (MasterPage)Master;
Panel pp = (Panel)ms.FindControl("Pan
pp.Visible = true;