mutlyp
asked on
Accordion control will not declare in Master Page
I developed an application and everything worked fine. Then I put the exact same code into a page that uses a MasterPage and I get an error saying that the Accordion control that I have on the page is not declared.
Here is the code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim categoryAdapter As New PPE_CategoryTableAdapter
Accordion1.DataSource = categoryAdapter.GetCategor ies(21)
Accordion1.DataBind()
Dim CatAdapter As New PPE_MainTableAdapter
End Sub
Also any function that uses Accordion like this:
Protected Sub Accordion1_DataBinding(ByV al sender As Object, ByVal e As System.EventArgs) Handles Accordion1.DataBinding
End Sub
The Accordion after the Handles says "Handles clause requires a withEvents variable defined in the conaing type or one of it's base types."
Don't understand why everything is perfedt when the page is by it's self but as soon as I set it up with a MasterPage I get these errors.
Please help
Thank You
Matt
Here is the code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim categoryAdapter As New PPE_CategoryTableAdapter
Accordion1.DataSource = categoryAdapter.GetCategor
Accordion1.DataBind()
Dim CatAdapter As New PPE_MainTableAdapter
End Sub
Also any function that uses Accordion like this:
Protected Sub Accordion1_DataBinding(ByV
End Sub
The Accordion after the Handles says "Handles clause requires a withEvents variable defined in the conaing type or one of it's base types."
Don't understand why everything is perfedt when the page is by it's self but as soon as I set it up with a MasterPage I get these errors.
Please help
Thank You
Matt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.