We help IT Professionals succeed at work.

Accordion control will not declare in Master Page

mutlyp
mutlyp asked
on
309 Views
Last Modified: 2012-05-05
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.GetCategories(21)
            Accordion1.DataBind()
            Dim CatAdapter As New PPE_MainTableAdapter
    End Sub


Also any function that uses Accordion like this:
Protected Sub Accordion1_DataBinding(ByVal 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

Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.