View Single Post
  #2 (permalink)  
Old September 11th, 2006, 06:26 AM
rit01 rit01 is offline
Friend of Wrox
Join Date: Oct 2005
Location: , , United Kingdom.
Posts: 173
Thanks: 0
Thanked 2 Times in 1 Post

HI All

I figured out a solution if anyone is interested...

What I did was used Menu2.Items.Clear() prior to calling my databind.

Protected Sub Menu1_SelectedIndexChanged
     (ByVal sender As Object, ByVal e As System.EventArgs)


        'database connection class/ function
        Dim Menu2Populate As New dbclass()
        Menu2Populate.Sproc = "strored procedure"
        Menu2Populate.CustomerID = Menu1.SelectedValue
        Menu2.DataSource = Menu2Populate.RetrieveMenu2data

    End Sub
Basically clears the menu before populating again.

If there is a better way of treating this please feel free to educate me.


Reply With Quote